At the interface of two media of different refractive index, the phase of the EM wave must be continuous for all space and time. This constraint has two important consequences;
- The frequency of the wave must be invariant (i.e. the same in both media).
- The spatial frequency component along the boundary must be invariant. This is how Snells law is derived.
Blue light bends differently to red light due to material dispersion; the variation of refractive index with frequency (color). In the case of normal dispersion, refractive index is higher for blue light than red, and vice versa for the case of anomalous dispersion.
The refractive index of a material is related to the polarizability of the medium (i.e. induced dipole moment per unit volume), in other words, how readily the electron clouds distort for a given applied field.
Claude.