Fact 1: refracting sunlight causes sunlight to split into different colors. 
Fact 2: Rainbows are formed when sunlight is refracted through raindrops.
Light splits into different colors when sunlight hits raindrops.