Answer:
Both are right. Refraction causes the different wavelengths to become visible.
Step-by-step explanation:
Rainbows are seen as an arc with 7 colors clearly visible. The seven colors are, in order from outer most to inner most color, Red, Orange, Yellow, Green, Blue, Indigo, and Violet.
The light coming from the Sun is made up of seven colors (VIBGYOR) each having its own wavelength and frequency. When this light passes through the tiny water droplets in the atmosphere three optical phenomenon are the reason behind the occurrence of the rainbow. These are: Refraction, reflection and dispersion.
Together they result in the white light splitting in seven different colors to show us the spectrum of light in the form of an arc called as rainbow.