What is the cause of dispersion of white light as it passes through a prism?
Dispersion occurs because the refraction of different colors is different. Light of different colours travel with same speed in vacuum. However they travel with different speeds in a refracting medium.
Speed of violet colour is least and that of the red colour is the most.
Hence the refractive index of the medium is largest for the violet colour and least for the red colour. As a result the refraction or bending of violet colour is the maximum and that of red colour is minimum. This difference in the extent of bending of different colours of light causes dispersion of white light into its constituent colours as they emerge out of prism.