Why doesn't the frequency of light change during refraction?
The electric and magnetic fields have to remain continuous at the refractive index boundary. If the frequency changed, the light at each side of the boundary would be continuously changing its relative phase and there would be no way to match the fields.
Think of it like this: At the boundary/interface of the medium, the number of waves you send is the number of waves you receive, at the other side, almost instantly. Frequency doesn't change because it depends on travelling of waves across the interface.
But speed and wavelength change as the material on the other side may be different, so now it might have a longer/shorter size of wave and so the number of waves per unit time changes.
Here is the bookwork answer.
Consider a boundary between two media to be the plane $y=0$. Draw a rectangular loop of side $\delta x$ and $\delta y$. Have an E-field either side of the boundary that is parallel to the boundary in the $x$ direction. The E-field is $E_1$ in medium 1 and $E_2$ in medium 2.
Now use the integral form of Faraday's law. $$ \oint {\bf E} \cdot d{\bf l} = - \int \frac{\partial {\bf B}}{\partial t} \cdot d{\bf S}$$ $$ E_1 \delta x - E_2 \delta x = -\frac{\partial {\bf B}}{\partial t} \delta x \delta y.$$ But now you can let $\delta y$ shrink to zero and you find that $E_2 = E_1$. i.e. the component of E-field that is parallel to the interface must be the same immediately either side of the boundary.
Now have the boundary be defined by the plane $y=0$, the point of incidence be ${\bf r}=0$ and have an incident wave approach it of the form $E = E_i \exp[i({\omega_i t - \bf k_i}\cdot {\bf r})] \hat{\bf k}\times \hat{\bf r}$, where $\hat{\bf k}$ is a unit vector in the direction of the wave-vector ${\bf k_i}$, and $\omega_i$ is the angular frequency.
The incident wave impacts at ${\bf r}=0$ and some of the light is transmitted and some reflected. The incident, reflected and transmitted rays are all in the same plane and because, as shown above, the parallel components must be the same either side of the boundary we can write. $$E_i \exp(i\omega_i t) \cos \theta_i + E_r \exp(i\omega_r t)\cos \theta_r = E_t \exp(i\omega_t t)\cos\theta_t,$$ where $\theta_i$ etc are the angles of incidence, reflection, transmission; and $\omega_r$ and $\omega_t$ are the frequencies of the reflected and transmitted waves.
But this relationship has to be true for all values of $t$. The only way this can be arranged is if $\omega_i = \omega_r = \omega_t$. So the frequency of the light is unchanged as it passes into the medium.
I have taken a shortcut here to get to the required result. Usually, when doing this proof you define a geometry so that the wave hits at various points along the interface and then this means that the arguments of the exponentials look like $(\omega_i t -k_i x\sin\theta_i)$, $(\omega_r t -k_rx\sin\theta_r)$ and $(\omega_t t -k_tx\sin\theta_t)$, where $x$ is a coordinate along the boundary. Demanding that these arguments are equal for all $x,t$ also gives you the law of reflection ($\theta_i = \theta_r$) and Snell's refraction law; $\sin \theta_t/\sin\theta_i = k_i/k_t$, and if $\omega_t = \omega_i$ and $\omega/k = c/n$, then $\sin \theta_t/\sin\theta_i = n_i/n_t$.