I know it’s kinda creepy when you see ghostly green eyes shining back at you in pictures, but there is a reasonable explanation. Dogs, cats and most nocturnal animals have a special layer of cells in or behind their retinas call tapetum lucidum which acts like a mirror in reflective light and helps them see better at night. “Eye shine” or “ghostly green glow” happens when the camera flash or any light reflects off the retinas and bounce back into the camera. This happens to humans, light reflects off our blood vessels and we get a “devilish glow” better known as “red eye“.
The way to avoid this problem is to not have the light source directly above your camera, which unfortunately is where most built-in flashes are located. So try shooting at an angle, use off-camera flashes or avoid flash all together.