When it’s dark, our pupils automatically open up to let in more light. There’s where the problem starts. Because our pupils are wide open there’s a larger area for the flash to enter. It hits the red retina, illuminating it, and this is picked up by the camera.
The eyes look red because light that comes from the flash is reflected to the lens of the camera from blood vessels in the retinas. As the flash goes off, some light travels straight into the eyes of the subject and is reflected back into the lens.