Why do animals' eyes glow at night?
Because many animals have a reflective layer behind the retina called the tapetum lucidum, which bounces light back through the light-sensing cells to give them a second chance at catching it.
Light entering an eye passes through the retina, and any photons the photoreceptors miss are normally absorbed and lost. The tapetum sits behind the retina and reflects that light straight back out through the photoreceptor layer. Anything not caught on the way in may be caught on the way out, effectively increasing sensitivity in low light — estimates suggest it can roughly double the available light.
The glow you see, called eyeshine, is simply the portion that passes back out of the eye and reaches you.
The colour varies by species and by the tapetum's composition. Cats typically show green or yellow-green, dogs green or blue depending on breed and age, cattle and deer often yellow-white, and many spiders a distinctive white. Alligator eyes glow red.
The trade-off is acuity. Reflected light scatters slightly before leaving the eye, which blurs the image marginally. Animals with a tapetum see better in the dark and slightly less sharply than they otherwise would — an acceptable exchange for a nocturnal hunter, and a poor one for an animal relying on daylight detail.
Humans do not have one. Our eyes evolved for daylight, and we see comparatively poorly at night as a result. What you see in flash photographs is not eyeshine but red-eye: light reflecting off the blood-rich retina itself, which is why it is red.
The effect is why animal eyes appear in headlights long before the animal is visible.