On occasion, particularly when performing an eye exam on small children the eye doctor will shine a beam of light in the eyes. But why? Firstly, this test is a retinoscopy examination, which is a preliminary way to measure the refractive error of your eye. Whether you're near or farsighted, or you have astigmatism, examining the way light reflects off your retina is a way your optometrist is able to determine if you need vision correction.
How well your eyes are able to focus under the circumstance we create during the exam is really what we're looking for. When light shines into your eye using a retinoscope, a reddish orange light reflects off your retina, through your pupil. This is called the red reflex. The retinoscope measures your focal length, or in layman's terms, it will measure the angle of refraction of light off your retina. And this is what tells us how well your eye is able to focus. If it becomes obvious that you can't focus correctly, we hold a few lenses with varying prescriptions in front of the eye to determine which one fixes the error. The lens power that works is the prescription you will need to correct your sight with glasses or contact lenses.
All this happens in a dark or dimmed room. You will usually be instructed to look at something behind the doctor. This makes eyes easier to examine. Because a retinoscopy exam doesn't require you to read eye charts, it means that it's also a really great way to determine an accurate prescription for kids who might struggle with speech, or others who might be speech-impaired.