Question: One way how to look at refraction by a dielectric medium like water or glass is that (phase) velocity of light decreases because it is the wavelength rather than the frequency of the light which changes.

I have read somewhere (but can't recall where) that the frequency must remain the same because otherwise principle of causality would be broken. Is that true?

Answer: 
The conservation of frequency is just the conservation of energy, since $$E=h\nu.$$
Here is a tutorial paper on causality and attenuation in classical EM. <http://mesoscopic.mines.edu/~jscales/causality.pdf> The theory applies to any linear response law, but many (famous) EM texts get this wrong or don't explain it well. This was published in the European journal is Physics. Our audience is advanced undergrads and grad students. The physical explanation is easy to understand but the ramifications can be subtle. Keep in mind that in the space-time domain Maxwell's equations are purely real and causality requires response functions such as the electric susceptibility to be non-local. This can be swept under the rug in the Fourier domain, but at some peril for students.