Final answer:
In a dark environment, the pupil dilates to allow more light in, and in a light environment, it constricts to protect the eye from bright light. This adjustment is controlled by the iris and is part of the pupillary light reflex.
Step-by-step explanation:
The size of the pupil is controlled by the iris, responding to changes in light levels. In a dark environment, the pupil dilates to allow more light to enter, which helps improve vision in low-light conditions. Conversely, in a bright environment, the pupil constricts to reduce the amount of light entering the eye, protecting it from potentially damaging high levels of light. This process is part of the pupillary light reflex, which is an automatic response governed by the sympathetic and parasympathetic nervous systems. When you turn on the lights after being in the dark, you might notice that the pupils rapidly constrict; this is the body's natural response to protect the retina from sudden bright light.