The correct answer is B: because it slows down, which causes it to bend.
When light passes from one medium (like air) into a denser medium (like glass), it slows down. This change in speed causes the light to change direction, or refract, at the interface between the two media. This bending of light is described by Snell's Law.