what cause rainbow to form
Rainbows are caused by the splitting of white sunlight into it component colors by raindrops. Some of the light that falls on a water drop enters the drop. Then, the different colors reflect off the back of the inside of the drop, and when they pass through the front of the drop again, they are refracted once again. A rainbow is always directly opposite the sun from the observer's perspective.
This discussion explains why it is the red light that is observed at the top and on the outer perimeter of a rainbow and the blue light that is observed on the bottom and the inner perimeter of the rainbow. Rainbows are not limited to the dispersion of light by raindrops. The splashing of water at the base of a waterfall caused a mist of water in the air that often results in the formation of rainbows. A backyard water sprinkler is another common source of a rainbow. Bright sunlight, suspended droplets of water and the proper angle of sighting are the three necessary components for viewing one of nature's most splendid masterpieces.