A rainbow is formed due to the dispersion of sunlight by raindrops.
Rainbow is formed due to sunlight getting dispersed and internally reflected inside raindrops.