Rainbows are caused by the splitting of white sunlight into its component colors by raindrops. The rainbow will usually occur when sunshine and raindrops cross paths. It is always seen in the opposite direction in the sky from the sun.
Rainbows are a refraction phoenomenon where the presence of sunlight during, before but mostly after rainfall, the sun refracts light and it manifests as a spectrum of light across the sky which usually consists the ROYGBIV colours.
A rainbow is caused when the light outside passes through the tiny drops of water in the atmosphere. The light is reflected through the water and comes out as a part of the color spectrum. You can find more information here: http://www.wisegeek.com/why-do-rainbows-form.htm
A rainbow is caused when raindrops act as a spectrum to separate the sun's white light. You see, white light is made out of all different colors: red, orange, yellow, green, blue, and purple (indigo).