That always happens in our daily life for feeling hurt when looking at some extremely bright light. That's because our eyes cannot adjust the strong light when the strong light suddenly appear, and we will feel much better when we adjust it after several minutes. While, if you still feel hurt for staying at the strong light circumstance for a long time, which causes you get photaesthesia. If it gets serious, see an eye doctor for help.
The human's eyes have certain extents of capability of adapting to the rays including the sunshine and fire. However, if the rays are too strong to the eyes stand, the eyes will feel photophobia and uncomfortable. The normal reflection in your physical body is to narrow the eyes or use other article to hide your eyes from the severe rays in order to relief the uncomfortable feeling from the rays. Once the sudden photophobia happen, is really an alert to you that your eyes should be protecting now. Maybe the rays are too strong to stare at! Usually, natural lights and rays will be not such strong enough to hurt your eyes immediately if you not staring at it for a very long time. However, if you are working on the computer for a long time, you can reduce the scream solution to protect the eyes. If you have to do like this in some conditions, a pair of sunglasses will be recommended to you to protect your eyes, relax and eyes massage help for other ways. If you are really getting the disease of photophobia, the best choice is going to find a doctor and have a check in your eyes.
According to your situation, you may have the problems of photaesthesia which you need to check out. Or your eyes may get infection because the invisible bacterium comes into your eyes. You could use the eye drops to make the eyes feel comfortable and become moisture. You could go to use the warm compress to make your eyes feel comfortable too.