When light enters a denser medium (like from air to glass) the speed and wavelength of the light wave decrease while the frequency stays the same. How much light slows down depends on the new medium's index of refraction, n. (The speed of light in a medium with index n is c/n.) For air, n is 1.0003, for ice, n is 1.31, and for diamond, n is 2.417.
Even though we see that speed of light changes in diferrent medium. Its actually a constant. That is speed of light doesn't change at all. The speed of light is a constant, and it is called c, the light of speed in vaccum. In vacuum sine there are no particles , light can travel at the highest speed.
This may seem contradictory, but when light moves slower through denser media because more particles get in its way. Each time the light bumps into a particle of the medium, the light gets absorbed which causes the particle to vibrate a little and then the light gets re-emitted. This process causes a time delay in the light's movement so the more particles there are (the more dense the medium), then the more the light will be slowed down.
But in rarer mediums the no of particles will be less. So light travels faster.
So there is no force acting on light when it travels from one medium to other. Slowing up and sppeding up of light in differnet mediums is due the interaction of light with the particles in medium..