Many stimulants--like meth and cocaine--can have that effect. Ecstasy also has that effect. It causes the pupils to dilate which allows more light into the eye, which can overwhelm the retina. There are also specific drugs used by eye specialists to dilate the eyes for testing, though they are often administered as eye drops (atropine derivatives). A few poisons have similar effects.
Most of these are temporary. Like when you get up in the middle of the night and turn on the light. After a second or so, your eyes readjust. With the drugs, the pupillary response is diminished or suppressed. That's why the eye doctors provide the shades after an eye exam. Prolonged sunlight could damage the eyes.