Eyeshine in animals is produced by a special membrane, called the tapetum lucidum (“tapestry of light”), a reflective surface that is located directly behind the retina.
For animals that have this membrane, it is like having a built in flashlight that lights a path from the inside out. The tapetum lucidum, coupled with big eyes and lots of light-sensing rod cells, allow nocturnal mammals to see well in dark or dim conditions. But eyeshine isn't limited to mammals.