A rainbow is a meteorological phenomenon that occurs when sunlight is refracted, reflected, and dispersed by water droplets in the atmosphere, resulting in a spectrum of light appearing in the sky. The process involves the refraction of sunlight inside the water droplets, followed by multiple internal reflections and reflections off the back surface of the droplets before the light exits, creating the beautiful arc of colors that we see in the sky.