Fact 1: refracting sunlight causes sunlight to split into different colors. 
Fact 2: When Sunlight passes through a prism, the light is separated into a rainbow of different colors.
Refracting sunlight causes sunlight to split into colors and form a rainbow.