Why doesn't the frequency of light change during refraction? When light passes from one medium to another its velocity and wavelength change. Why doesn't frequency change in this phenomenon?
 A: This is not really a specific fact about electromagnetic waves. It's a fact about all waves. The basic reason for it is cause and effect. Think of how people "do the wave" in a stadium. The way you know it's your turn to go is that the person next to you goes. When a wave travels from medium 1 to medium 2, the thing that's causing the vibration of the wave on the medium-2 side is the vibration of the wave on the medium-1 side. 
A: It happens like that because that's what refraction is, by definition. As Rob Jeffries's answer shows, there are solutions of Maxwell's equations where a no frequency shift refraction happens across the interface, so it is possible. When we observe such behavior, i.e. an elastic interaction with the boundary, we call it "refraction". 
But we are making a tacit assumption that the interaction with the interface is elastic, i.e. conserves photon energy, and no energy is lost as heat to the mediums as the process happens. We are also making a tacit assumption that the interaction with the interface is linear, and thus there are no multiphoton processes which would double, triple, ... the light frequency. These latter would be theoretically possible, but one can also make a handwaving argument that these latter kinds of interactions are highly unlikely given the interaction region's thin nature and if the light intensity is not too high.
A: 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.
A: 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.
 
A: 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$.
A: When we think of light, we can describe it as an electromagnetic wave or as a flux of particles - photons. The latter description is more fundamental: If you could have a light source with sensitive enough intensity knob, then after just turning it on (minimum intensity), you'd be sending out photons one by one. I believe that answers to your deep questions lie therein. Behold:
Energy of one light quantum (one photon) can be written $E = hf$, where $h$ is a universal (Planck's) constant, $E$ is energy and $f$ is frequency. We cannot divide photon in pieces, so its energy must stay constant and frequency goes the same way. Devices that appear to divide photons (or change photons' frequency) actually first swallow-destroy the incoming photons and then emit other photons at a different frequency. Frequency of light does not ever change, as long as you can be sure that the photons are the same as the photons at the beginning.
Wavelength $L$ is, on the other hand, tied with energy through its speed, $E = hf = hv/L$ . Atoms of materials, even gases like air, impede the flow of photons - photons bounce off of the atoms (elastic collisions) or are swallowed and re-emitted by the atoms (inelastic collisions). Like I wrote above, a photon swallowed and re-emitted is a different photon. So, it is not part of the original light stream. The Snell's laws speak only about the part of light (photons) that experienced only elastic collisions in a material.
So, in passing from one material to another, light changes wavelength proportionally to the change of speed, so that the ratio $v/L = f$ remains constant. But does that mean that it changes color? That depends, how you define color! As color is usually defined via wavelength (i.e. visible light wavelengths in the range 300-700 nm), then indeed, color changes on the interface of two optical materials with different indexes of refraction (like air-glass, air-water, etc).
A: At an abstract high level, it's because the boundary conditions are such that the interface between media is a timelike hypersurface. That's what breaks the symmetry between space and time.
If the medium's material properties (e.g. index of fraction) were uniform throughout space but then suddenly changed to new spatially uniform values, then the interface would instead be a spacelike hypersurface, and the light's wavelength would stay the same while its frequency changed, rather than the more typical opposite case. See my answer here to a duplicate question.
A: If your neighbour strikes a key A at 440 Hz for one second, the package of 440 cycles will propagate through the air at 343 m/s and therefore be 343 meters long and then be inscribed in a concrete wall in one second.
As the package is inscribed in concrete wall it will propagate away by 3700 m/s and hence the package will be stretched to be 3700 meters long before the entire package is written into the unusually thick and expensive wall.
A microphone membrane submerged in the concrete will be able to count the 440 periodes and in one second all of them has passed.
Number of cycles per second must be the same when crossing a boundary as cycles can not disappear, be held up/stored in the boundary surface of two materials.
It is like the flow of an incompressible liquid. If the liquid flows faster the cross section has to change. The flow, volume per second, is constant constant across every cross section.
