light is electromagnetic wave.ie both electric and magnetic fld oscillatesperpendicular to each other as light propagates.as the density of the medium changes, its speed also changes.as frequency of vibration remains same so the wavelength changes.
as we have seen when we drop a stone in a pond ri[pples will be produced...we can see that all the points in circle around the point will vibrate in the same phase.
from huygen's principle we know that,point A and B onthe same wavefront, ie points having same phase of vibration. so when A is on the surface of another medium, B is still BD dist to go. by this time A goes ac dist in the other medium with some other speed . so AC will never be equal to BD. so point D and C will have same phase.from this concept only we can say that the path must bend to satisfy all the conditions.