Hello,
Light is an electromagnetic wave, its speed is maximum in space and almost in the air where interactions have almost no effect. In other non-opaque media, light is subject to several phenomena: refraction and reflection. Part of the incident ray will be reflected in the same medium while the other part will be refracted in the new medium with a lower speed. In general, the medium influences the speed, and therefore the wavelength.