Why is it that your eyes hurt when you look into a bright light?

Reflex. Strongly bright light can be uncomfortable and maybe even dangerous. The discomfort you feel is a protective reflex and is your eyes way of telling you not to stare at such light.