Every once in a while I get a very sharp pain on the outside of my right ear. It hurts to touch the ear, it even hurts to swallow. Most of the time it goes away within a couple of hours. This can happen as often as a couple of times a week, or every couple of months.
It could result from a number of things. Interestingly, pain in the ear is often due to what is called 'referred pain' which means that it originates somewhere else. Ear pain is often due to teeth problems or a throat infection. It happens when the nerves leading to the ear get irritated sending pain to the ear. Sinus infections, impacted teeth, acid reflux, TMJ, sore throats, etc. can all cause this (as can blockages in the ear canal).
Your doctor should be able to take a look and give you an idea what's going on. Good luck!
Here are a few articles that might interest you: