Difference in velocity of light in change in medium It is often seen that according to physics the light changes it's velocity according to the medium through which it is traveling. So can it be explained that why so happen?
 A: Actually, the phase velocity of the light wave changes during refraction. Allow me to define something. I think you know that the frequency is number of vibrations (oscillations) per second whereas wavelength is the distance between any two points at the same phase of a wave's consecutive cycles.
OK. Light is a form of electromagnetic wave composed of both electric & magnetic fields. And so, it satisfies with Maxwell equations. As light enters from a rarer medium to a comparatively denser medium, it is scattered by various atoms in the media. Shortly, This spontaneous scattering results in the radiation of a constructively super-imposed refracted wave.
During this superposition, the electric & magnetic field of the wave interacts with the electrons proportional to the permittivity ($\epsilon$) and permeability ($\mu$) of the medium (i.e) How they're magnetized & polarized, etc. Thus, the electrons are set into rapid oscillations and thereby, emit an EM wave of the same frequency but of different wavelength. The total superposition results in an EM wave of varied phase velocity. Because, the wave experiences a phase shift during its transmission through the media.

One thing must be noted that - If the frequency of the wave had varied, the energy $h\nu$ of the wave would've changed. To satisfy the wave equation and in order to conserve energy, there's a necessity for the wavelength $\lambda$ to change, thereby altering the phase velocity $v_{phase}=\nu\lambda$.
A: The speed of light is always constant. The speed doesn't change, but the distance it travels might change. For example the speed of light "decreases" with about 35% when traveling in optical fiber. This happens because light doesn't go straight trough the fiber, it bounces in all directions. It's like putting a lot of mirrors. So the distance that we measure (the length of the optical fiber) is not the same is the distance light travels 
So if you would have vacuum then the distance light travels would be the same as the distance you "can" measure, but if you don't have vacuum light will bounce from one atom to another. The photon will be absorbed by the atom, the atom's energy will rise for a few moments, and then it will fall back again to his original state, releasing the photon. This creates first of all a different wave length(a different color) and a longer path for light to travel. Because the photon doesn't go in a straight line from one atom to another.
A: This happens because the light interacts with electric fields in the medium to form polaritons.
Light always travels at the speed $c$, but when it passes through matter the electromagnetic field that constitutes the light interacts with electric fields in the matter and you no longer have a pure light wave. Instead you have a quantum mechanical mixture of light with the substrate, and this mixture behaves as if it has a mass. That is why the mixed wave travels slower than the speed of light.
The strength of the interaction depends on the substrate. A stronger interaction gives the mixed light/substrate wave a higher mass and it moves more slowly (and results in a higher refractive index). In special cases such as Bose Einstein Condensates the inetarction can be so strong that the light/substrate wave is slowed to everyday speeds or indeed almost to a halt.
