One way to understand this is through quantum mechanics. According to that theory, light consists of individual particles called photons. Each such photon carries an amount of energy that is proportional to the frequency of its wave oscillations. Put the photon into water and it moves more slowly but still contains the same amount of energy -- so its frequency remains the same. Going more slowly with the same frequency means the photon travels less distance with each oscillation, so the wavelength decreases as the frequency remains the same. This also implies that our eyes really respond to the energy of the photons, and thus the frequency of the light -- not its wavelength. We see this because things look the same color viewed through water as when we see them in the air. Red things do not turn green before our eyes because the light has a shorter wavelength in water -- they stay red because the light keeps the same frequency.