I once had a big raised bump behind my ear - it was almost purple in colour and it was just a raised gland... - which went away of it's own accord.
Otherwise, could it be a spot - sometimes you can get them under the skin, and they feel really hard and hurt - but they vanish without ever eruptng, so to speak?
I would wait a few days and go to the docs if you are really worried. I doubt the sun would cause anything behind your ear, as it would be shaded by your ear - and a sinister lump wouldn't suddenly appear.
Try not to worry - I know it is easier said than done