The following is not a proof but it gives some physical intuition why such a formula is true.
If at time $t=0$ a unit of heat is concentrated at $x=0$ and dissipates according to the heat equation
$u_t=u_{xx}$ along the $x$-axis then the temperature $x\mapsto u(x,t)$ is a Gaussian becoming flatter and flatter as $t$ increases:
$$u(x,t)={1\over\sqrt{4\pi t}}e^{-x^2/(4t)}\qquad(t>0)\ .$$
Now if at time $t=0$ we have such a unit of heat at each integer point $k$ then the resulting temperature will be
$$u(x,t)={1\over\sqrt{4\pi t}}\sum_{k\in{\mathbb Z}}e^{-(x-k)^2/(4t)}\ .$$
In particular the temperature at $x=0$ will be
$$U(t)={1\over\sqrt{4\pi t}}\sum_{k\in{\mathbb Z}}e^{-k^2/(4t)}\qquad(t>0)\ .\qquad {\rm (a)}$$
On the other hand the process considered here is periodic in $x$ with period $1$. So the temperature $u(x,t)$ must have a description of the form
$$u(x,t)=\sum_{k\in{\mathbb Z}}a_k(t)e^{2\pi i k x}$$
for certain functions $a_k(t)$. Plugging this into the heat equation gives $a_k(t)=c_k \exp(-4\pi^2 k^2 t)$ for constants $c_k$, so that we now have
$$u(x,t)=\sum_{k\in{\mathbb Z}}c_k \exp(-4\pi^2 k^2 t)e^{2\pi i k x}\ .$$
The $c_k$ have to be determined by the initial condition which is a delta-function at $x=0$. Here we have to cheat a little: We replace the delta-function by a rectangle of width $2\epsilon$ and area $1$. The computation gives $c_0=1$ and $$c_k={\sin(2\pi k\epsilon)\over 2\pi k\epsilon}\qquad(k\ne 0)$$
which tends to $1$ with $\epsilon\to0$. This means that "in the limit" we have
$$u(x,t)=\sum_{k\in{\mathbb Z}} \exp(-4\pi^2 k^2 t)e^{2\pi i k x}\qquad(t>0)\ .$$
Putting $x=0$ here gives
$$U(t)=\sum_{k\in{\mathbb Z}} \exp(-4\pi^2 k^2 t)\qquad(t>0)\ .\qquad{\rm (b)}$$
If you believe that (a) and (b) are the same thing then you have the stated formula with $4\pi t$ instead of $x$.