When the sunlight strikes a raindrop, the light is refracted (bent) because the light is moving from one medium(air) to another( water). Drops of rainwater can disperse light in the same way as a prism.. When the light comes out of the water droplet, the sun's rays (white light)have now been split into their component wavelengths (colors). In this way, each individual raindrop behaves just like a prism, dispersing white sunlight into its seven component colors and a rainbow is formed. The rainbow we see is thus a result of many, many raindrops bending the sun's rays.