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 EM field must remain continuous at the air/water boundary. This can only happen if the frequency stays the same. If the frequency changed there would be a discontinuity oscillating at the difference in the frequencies.
I haven't heard that explanation before, but I imagine that the argument might go something like this. The amplitude of a plane light wave at a frequency *ω* varies like sin(*ωt*). Roughly speaking, when it encounters a medium, the disturbance in the electric field perturbs the electron clouds of the atoms in the medium and makes them oscillate, also at frequency *ω*. The moving charges, in turn, create a disturbance in the electric field, again at frequency *ω*, which becomes part of the propagating wave.

If the frequencies weren't the same, then the charges wouldn't be *following* the electric field; they'd be off doing their own thing. How would they even be supposed to know that the original wave was a sinusoid with a well-defined frequency? Suppose the frequency in the medium *ω*₁ was higher than *ω*, then at time *t* = 0 both the amplitude of the electric field and the perturbation of the electron cloud might start increasing from 0. However, the electron cloud would reach its peak *earlier* and start decreasing, whereas the electric field that was supposed to be driving it wouldn't start decreasing yet! I suppose that could be argued to violate causality.

However, this argument is rubbish; in practice, the response of the medium to an electric field is not linear, and other frequencies are generated when a light wave propagates through a medium.