There are many types of headaches and there are 1001 causes for headaches.
I think that in your case it is most probably migraine.
As the others have said,you need to get an eye check up,since frequent lack of use of spectacles leads to headache.
You might also need an anti-glare set of glasses that help a lot when you are on the net or in front of a CRT or even flat screen all the time.
If you dont eat well or drink enough water then this is also a cause for headache.
Dehydration is a strong word,but yeah lack of water in your body can lead to headache.
A constant throbbing pain at the temporal [ side of forehead] part or at the back of your head with photophobia [ increased sensitivity to light ] and phonophobia [ increased sensitivity to noise ] is most likely migraine.
Sometimes you might also notice that the headache is mostly on one side of your head,right or left.This is very typical of migraine.
At times the headache takes days to calm down and sometimes it resolves after some paracetamol and brufen.
A very persistent headache is cause for concern as there are other more serious causes,as in SOL,space occupying lesion in the brain and tumours.
The diagnosis is made after a CT or MRI scan.
Hope this helps.