Always remember the frequency of light never changes, because it depends on the source, so we have the equation,
f = c/w where c is the speed of light, and w is the wavelength. so
we know that the velocity of light decreases when it travels from rarer to denser medium so to keep the frequency constant the wavelength should also decrease.