Why is the temperature zero in the ground state? Consider the following statement:

If we know that the system is in the ground state, then the temperature is zero.

How does this follow from the statistical definition of temperature?
 A: Here I will provide an answer from the point of view of equilibrium density matrix:

*

*The eigenequation of Hamiltonian $\hat H$:
$$\hat{H}|\phi_n\rangle = E_n|\phi_n\rangle \qquad (n=0,1,2,\cdots) \tag{1}$$

*The spectrum decomposition of Hamiltonian:
$$\hat{H}=\sum_{n\in\mathbb N_0}E_n|\phi_n\rangle\langle\phi_n| \tag{2} $$

*Equilibrium density matrix:
$$ \hat{\rho} \equiv \dfrac{e^{-\beta \hat{H}}}{Z}=\sum_{n\in\mathbb N_0} \dfrac{e^{-\beta E_n}}{Z}|\phi_n\rangle\langle \phi_n| = \dfrac{\sum_{n\in\mathbb N_0}e^{-\beta E_n}|\phi_n\rangle\langle\phi_n|}{\sum_{n\in\mathbb N_0}e^{-\beta E_n}} \tag{3}$$
where $\beta=\dfrac{1}{k_B T}$ is the inverse temperature and we have used the fact $\hat{H}$ commutes with $\hat{\rho}$ in equilibrium.

*The zero temperature limit $T \rightarrow 0$ or $\beta\rightarrow\infty$:
$$\lim_{\beta\rightarrow\infty}\hat{\rho} = \lim_{\beta\rightarrow\infty} \dfrac{\sum_{n\in\mathbb N_0}e^{-\beta E_n}|\phi_n\rangle\langle\phi_n|}{\sum_{n\in\mathbb N_0}e^{-\beta E_n}} = \lim_{\beta\rightarrow\infty} \dfrac{\sum_{n\in\mathbb N_0}e^{-\beta (E_n-E_0)}|\phi_n\rangle\langle\phi_n|}{\sum_{n\in\mathbb N_0}e^{-\beta (E_n-E_0)}} = |\phi_0\rangle\langle\phi_0| \tag{4} $$
For Hamiltonian $\hat{H}$ with degenerate ground states $(4)$ reduces instead to an equally weighted ensemble of degenerate ground states.

A: Mad props for a cool question.  I'm going to justify essentially the converse of the statement because it doesn't make much sense to talk about the temperature of a system that is in a pure state.
Let's assume that we're talking about a quantum system with discrete energy spectrum (with no accumulation points) in thermal equilibrium.  Let $\beta = 1/kT$ be the inverse temperature.  Then recall that the Boltzmann distribution tells us that the population fraction of systems in the ensemble corresponding to energy $E_i$ is given by
$$
  p_i = \frac{g_ie^{-\beta E_i}}{Z}
$$
where $g_i$ is the degeneracy of the energy level.  In particular, note that the relative frequency with which energies $E_i$ and $E_j$ will be found in the ensemble is
$$
  p_{ij}(\beta) = \frac{g_ie^{-\beta E_i}}{g_je^{-\beta E_j}} = \frac{g_i}{g_j}e^{-\beta(E_i - E_j)}
$$
In particular, let $i=0$ correspond to the ground level, then the frequency of any level relative to the ground level is
$$
  p_{i0}(\beta) = \frac{g_i}{g_0}e^{-\beta(E_i - E_0)}
$$
Notice that since the ground level has the lowest energy by definition, we have $E_i - E_0 \geq 0$, but zero temperature corresponds to the limit $\beta \to \infty$, and we have
$$
  \lim_{\beta \to \infty } p_{i0}(\beta) = \delta_{i0}
$$
In other words, at zero temperature, every member of the ensemble must be in the ground energy level; the probability that a system in the ensemble will have any other energy becomes vanishingly small compared to the probability that a member of the ensemble has the lowest energy.
Addendum - September 18, 2017
In response to a question in the comments about whether or not at zero temperature the system is in a pure state: 
Recall that a quantum state (density matrix) $\rho$ is said to be pure if and only if $\rho^2 = \rho$.  We now show that as $T\to 0$, or equivalently as $\beta\to+\infty$, the thermal density matrix $\rho$ approaches a density matrix $\rho_*$ that is pure if the ground level is non-degenerate and not pure otherwise.  We will rely on an argument quite similar in character to the one given above in which we compared the probabilities of finding a system in a given energy level when we approach zero temperature.
For any positive integer $d$, let $I_d$ denote the $d\times d$ identity matrix.  As above, we consider a system with discrete energy levels $E_0<E_1<\dots$ and with corresponding degeneracies $g_0, g_1, \dots$.  Recall that the thermal density matrix, namely the density matrix for a system in thermal equilibrium with a heat bath at inverse temperature $\beta$, is given in the energy eigenbasis by:
\begin{align}
    \rho = \frac{1}{Z}
    \begin{pmatrix}
        e^{-\beta E_0}I_{g_0} & & &  \\
         & e^{-\beta E_1} I_{g_1} & &   \\
         && e^{-\beta E_2} I_{g_2} \\
         & & &\ddots 
    \end{pmatrix}, \qquad Z = \sum_j g_j e^{-\beta E_j}.
\end{align}
Let $i\geq 0$ be given, and let us concentrate on the scalar factor in front of the identity matrix $I_{g_i}$ in the $i^\mathrm{th}$ block of the density matrix:
\begin{align}
    \frac{e^{-\beta E_i}}{Z} = \frac{e^{-\beta E_i}}{\sum_j g_je^{-\beta E_j}} = \frac{e^{-\beta(E_i -E_0)}}{\sum_jg_j e^{-\beta(E_j - E_0)}} = \frac{e^{-\beta(E_i -E_0)}}{g_0 + \sum_{j>0}g_j e^{-\beta(E_j - E_0)}}.
\end{align}
Therefore, we have
\begin{align}
    \lim_{\beta\to +\infty} \frac{e^{-\beta E_i}}{Z} = \frac{\lim_{\beta\to +\infty}e^{-\beta(E_i -E_0)}}{g_0 + \lim_{\beta\to +\infty}\sum_{j>0}g_j e^{-\beta(E_j - E_0)}} = \frac{\delta_{i0}}{g_0 + 0} = \frac{\delta_{i0}}{g_0}.
\end{align}
Care may need to be taken in the case of an infinite-dimensional Hilbert space in asserting that the limit of the sum in the denominator approaches zero since it's an infinite series.  It follows that
\begin{align}
    \rho_* = \lim_{\beta\to+\infty} \rho = 
    \frac{1}{g_0}\begin{pmatrix}
        I_{g_0} & & &  \\
         & 0 & &   \\
         && 0 \\
         & & &\ddots 
    \end{pmatrix}
\end{align}
and therefore in particular $\rho_*^2 = \rho_*$ if and only if $g_0 = 1$.
A: A simpler and probably more naive explanation is to note that, by the equipartition theorem, $E \propto T$.  So in the ground-state, where $E = 0$, it must be that $T = 0$ as well.  However, this only works in the classical case  (for example, the ground state energy of a quantum harmonic oscillator is not equal to 0).
The answer by joshphysics is great but I think there is small typo in his post.  Shouldn't the inequality read $E_i - E_0 \geq 0$.  I tried to edit the post, but "edits must be at least 6 characters".  And I'm unable to comment on the post.
A: What is zero temperature?
Zero temperature in this context means the temperature that is lower than the lowest excitation energy of the system, which means that a system with a continuous excitation spectrum might actually never be in the ground state.
When do we speak about zero temperature?
Nevertheless, zero temperature is often used as a convenient approximation for various calculations, where its smallness is determined by the characteristic terms included in the Hamiltonian, rather than true phsyics. Thus, it is not uncommon to hear statements like

My zero temperature is much higher than the Kondo temperature.
(In this case it says that we neglect the Kondo effect, assuming $T\gg T_K$, but the temperature is low enough to, e.g., approximate Fermi functions by step function, consider that the level broadening is homogeneous, etc.)

Zero temperature is not attainable
Actually, zero temperature can never be reached. See, e.g., this question.
