The possibilities include -
any infection like sinusitis or even gastro-intestinal infection etc.
The list is very vast. If it not regular and happens only occasionally you can releive it with tylenol. If you are having recurrent attacks or it is very severe then you need to see a doctor to get investigated. (A CT scan may have to be done). Thanks.
I would advise you to rule out a refractive error and glaucoma as well by visiting an ophthalmologist. Headache is acommon side effect of Prilosec. So, you should ask your doctor for it's substituton. If it improves with that then you may not go to an ophthalmologist. Thanks.