If your eyes feel hurt because of the light is too strong, don't worry, most people have the same reaction when they staring at strong light and it means nothing. But if your eye feel hurt when you look at any kind of light (no matter the light is strong or not). While, I think it's right time for you see a doctor.
It is probably caused by tiredness. Our eyes are pretty tired at night like the rest of our body. You need to take a break immediately when you get tired. Massage your eyes for a while, and then use some artificial tears to smooth your eyes.
Photophobia can be more serious, you may suffer from the hurt in daytime.
Do not overuse your eyes. They need relax once a hour, look outside to refresh your eyes and your mind. It'll help you work more efficiently. Eat more vitamin containing food, such as fruits and vegetables.
It is very possible that you may get photophobia. Photophobia, also known as afraid of light, which is really a bad eye disorder that can lead to further eye problems, such as blurry vision and double vision. Causes of photophobia are various, for instance cataracts, iritis and optic neuritis. Magnesium deficiency and migraine are also possible to cause it. People who suffer photophobia are easy to experience burning, be sensitive to light and hot wind, a feeling of sandy in eyes. The best way to heal it is surgery. And keep eye health is the most important way to prevent photophobia.