How does defrosting your freezer save energy? I've been told I should defrost my freezer to save energy, wiki, here and here for example, but none of the linked sites is a peer-reviewed paper explaining why (the wiki article doesn't even have references), and I don't find it obvious. I don't understand how the mechanism works, and I ask you for a good paper read on the subject or an explanation. 
 A: The following point wasn't made in the other answers. The efficiency of a refrigeration cycle is determined by its coefficient of performance (COP), defined as:
$$ COP = \frac{|Q_L|}{|W|} $$
$Q_L$ is the heat extracted from the freezer and $W$ is the (electrical) power that drives the cycle, i.e. the compressor power. For an ideal, reversible refrigeration cycle, such as a Carnot cycle, the COP depends only on the temperatures of the heat reservoirs with which it exchanges heat:
$$ COP = \frac{T_L}{T_H - T_L} $$
$T_L$ is the low temperature (e.g. the interior of a freezer), and $T_H$ the high temperature (e.g. ambient room temperature). 
In practice, there are finite temperature differences between the refrigerant and the heat reservoir at both sides of the refrigeration cycle. In order to extract heat from the freezer, the refrigerant must have a temperature $T_l < T_L$, and the other way around at the condensor side (back-side of the freezer) where the refrigerant must have a higher temperature than the environment ($T_h > T_H$). This limits the COP to:
$$ COP = \frac{T_l}{T_h-T_l} < \frac{T_L}{T_H - T_L} $$
The thermal resistance imposed by the ice formation increases the difference between $T_l$ and $T_L$ and thereby reduces the COP even further. As a result, ice formation reduces the efficiency of a freezer, meaning there is more electric power needed to drive it.
Remark
Of course, real refrigeration systems have lower COP than the Carnot cycle, because of irreversibilities. However, the above trend is also applicable to real systems.
A: Refrigerators and freezers work by running a really cold liquid through cooling pipes fitted in the cavity to be cooled. This flow (the compressor) is switched off when the set temperature is reached, the faster the set temperature is reached, the less energy the appliance uses.

Cold fluid at $T_c$ runs through the cooling pipes. The cavity to be cooled is at $T_f$. Now let's look at small area $A$ on the surface of a cooling pipe.
When the cooling pipe is clean (not frosted over) then Newton's cooling law
tells us that the heat flux (amount of heat removed per unit of time)  $\dot{q}$ through $A$ is:
$$\dot{q}_\textrm{clean}=hA(T_f-T_c)$$
Where $h$ is the heat transfer coefficient.
But when the surface is frosted over with porous ice, then:
$$\dot{q}_\textrm{frosted}=uA(T_f-T_c)$$
It can be shown that:
$$\frac{1}{u}=\frac{1}{h}+\frac{\theta}{k}\implies u=\frac{hk}{k+h\theta}$$
Where $\theta$ is the thickness of the frosty material and $k$ the thermal conductivity of the frosty material.
Because the frosty material is a poor conductor of heat ($k$ has a low value):
$$h>\frac{hk}{k+h\theta}$$
(Note that the frosty material isn't pure ice, it's highly porous ice that contains much entrapped air, thereby further lowering the $k$ value of the frost). And this means that, all other things being equal:
$$\dot{q}_\textrm{clean}>\dot{q}_\textrm{frosted}$$
Multiply this of course for the total surface area of the cooling pipes. So clean cooling pipes carry away the heat more quickly, resulting in the compressor running for shorter times to reach the set temperature. This saves energy, Note also how freezers that have been frosted over more (higher frost thickness $\theta$) perform worse.

A slightly more detailed approach:

$$\dot{q}_\textrm{clean}=u_1A(T_f-T_c)$$
$$\dot{q}_\textrm{frosted}=u_2A(T_f-T_c)$$
Here it can be shown that:
$$\frac{1}{u_1}=\frac{1}{h_1}+\frac{\theta_1}{k_1}+\frac{1}{h_2}$$
And:
$$\frac{1}{u_2}=\frac{1}{h_1}+\frac{\theta_1}{k_1}+\frac{\theta_2}{k_2}+\frac{1}{h_3}$$
But here too, because the frost conducts heat poorly ($k_2$ is small):
$$u_1>u_2$$
So that clean pipes carry off the heat more quickly, all other things being equal.
Symbols used in this section:
$h_1$: convection heat transfer coefficient, cooling fluid to metal.
$h_2$: convection heat transfer coefficient, metal to air.
$h_3$: convection heat transfer coefficient, frost to air.
$k_1$: thermal conductivity, metal.
$k_2$: thermal conductivity, frost.
$\theta_1$: thickness, metal.
$\theta_2$: thickness, frost.
A: Adding to very nice Gert's answer I'd like to point other, not so scientific, reasons.


*

*The ice is not generally formed as solid void-free but it is quite porous. That porosity leads to even lower thermal conductivity and lower thermal capacity ($J/K\ m^3$).

*If we suppose that condensation/desublimation rate is proportional to surface area we can assume that with frosting the freezer the rate is increasing. When the ice is formed it releases heat of $h_{evap}$ and $h_{melt}$ and this extra heat must be "cooled".

*When the solid ice is formed, due to limitted conductivity (surface layer is melted down by condensed vapour and flows down where it freezes), and it is capable to work as heatsink, the freezer is usually in condition where the ice prevents proper sealing.

*There is, probably, simple control loop which swiches the compressor and thus keep the temperature in range of, say, -10 to -11 C. If you have icy buffer only on cooling side you have to "precooled" ice near the walls causing the freezer opperates in range of, say, -9.5 to -11.5 C because your control loop is slightly slowed down. If the temperature sensor is covered too, your control loop is way too slow and you can easily operate in range of -5 to -15 C.

*Properly designed buffer layer (high capacity, good insulation, high conductivity) increases the efficiency quite effectively. But icy foam and porous ice formed in freezer has neither high thermal capacity (with respect to its volume), neither good conductivity.

A: Another model:

A coil or serpentine through which refrigerant fluid flows has a total length $x=L$. The cavity is perfectly insulated. The temperature $T_f(t)$ inside the cavity is considered time-dependent only (uniform spatial temperature distribution).
The temperature of the coil/serpentine is both time and position dependent: $T_c(x,t)$.
For an infinitesimal serpentine element $dx$ at $x$ an infinitesimal heat flux is given by:
$$d\dot{q}=udA[T_f(t)-T_c(x,t)]=up[T_f(t)-T_c(x,t)]dx$$
Where $p$ is the perimeter of the pipe (e.g. $2\pi r$, in the case of a cylindrical pipe), so $dA=pdx$.
Heat absorption causes an infinitesimal temperature increase:
$$dq=dmc_{p.c}dT_c(x,t)$$
And with
$$\frac{dm}{dt}=\dot{m}$$
$$d\dot{q}=\dot{m}c_{p,c}dT_c(x,t)$$
Combining both expressions and integrating gives:
$$T_c(x,t)=T_f(t)+[T_{c,0}-T_f(t)]e^{-\alpha x}$$
With:
$$\alpha=\frac{up}{\dot{m}c_{p,c}}$$
For $x=L$:
$$T_c(L,t)=T_f(t)+[T_{c,0}-T_f(t)]e^{-\alpha L}$$
Similarly:
$$dq=-CdT_f(t)$$
$$\frac{dq}{dt}=-C\frac{dT_f(t)}{dt}$$
Where:
$$C=\displaystyle \sum_1^nm_ic_{p,i}$$
We assume $t=0$ is the moment the pump is switched on and that the thermostat is set to reach a set temperature $T_s$ (the pump then switches off):
$$T_c\leq T_s\leq T_f(0)$$
Using the expressions above some more can be derived:
1. Time $t_s$ needed to reach $T_s$:
$$t_s=\frac{1}{1-e^{-\alpha L}}\frac{C}{\dot{m}c_{p,c}}\frac{T_{f,0}-T_s}{T_{c,0}-T_s}$$
This confirms the role of the heat transfer coefficient $u$, because as $u$ increases the factor $\frac{1}{1-e^{-\alpha L}}$ decreases. High values of $u$ thus reduce pumping time $t_s$.
2. Time-evolution of $T_f$:
$$T_f(t)=\frac{\beta T_{c,0} t-T_{f,0}}{\beta t-1}$$
Where:
$$\frac{1}{\beta}=\frac{1}{1-e^{-\alpha L}}\frac{C}{\dot{m}c_{p,c}}$$
3. End-temperature of coolant:
$$T_c(L,t_s)=T_s+[T_{c,0}-T_s]e^{-\alpha L}$$
Again the influence of $u$ is clear: higher $u$ lowers $T_c(L,t_s)$.
Notes:
I was hoping that a more detailed model would allow to address Hassassin's and Turion's concerns, regarding the 'second part of the cycle'. The argument goes that although pumping time is reduced, that says nothing about the energy needed to cool the eluted coolant back to $T_{c,0}$. This model doesn't really clear up that question.
This may in part due to the fact that refrigerators/freezers don't really operate the way described in this simple model. Instead a low boiling liquid is pumped through the serpentine and heat is carried off as latent heat of vapourisation of the coolant. The serpentine's temperature should therefore be roughly constant. Efficiency of of the refrigerator/freezer's heat engine may be the key to better understanding why clean appliances use less energy.
A: Defrosting only saves energy because the internal part may be frosted up restricting airflow which makes the fan work harder. Also the more stuff you have in your freezer the less air is needed to be cooled after it is opened and shut.
