A rainbow is caused by the refraction, dispersion, and reflection of sunlight in raindrops. When sunlight enters a raindrop, it is refracted, or bent, and then dispersed into its individual colors. The dispersed light is then reflected off the back of the raindrop and exits at an angle, creating the arc of colors that we see as a rainbow.