Why does frequency of light does not change when it is passing through one medium to another?
Refraction occurs when the energy of an incoming light wave matches the natural vibration frequency of the electrons in a material. The light wave penetrates deeply into the material, and causes small vibrations in the electrons. The electrons pass these vibrations on to the atoms in the material, and they send out light waves of the same frequency as the incoming wave. But this all takes time. The part of the wave inside the material slows down, while the part of the wave outside the object maintains its original frequency.
Hope this helps.