Final answer:
Light bends when it passes into a new medium due to refraction, which is caused by the change in the speed of light in different mediums.
Step-by-step explanation:
When a beam of light passes from one medium to another, it can bend due to a phenomenon called refraction. Refraction occurs because light travels at different speeds in different mediums. When light enters a medium with a higher refractive index (such as going from air to glass), it slows down and bends towards the normal, which is an imaginary line perpendicular to the surface of the medium. Conversely, when light enters a medium with a lower refractive index (such as going from glass to air), it speeds up and bends away from the normal.
Learn more about Refraction of Light