Disclaimer: I do all the computation below without any care for the factors $2\pi$. No one shall ever do that, it's bad. But the ideas are there and I don't have a lot of time.
We set $BL^2 := \{f \in L^2 (\mathbb R) \mid \hat f = 0 \text{ almost everywhere on }\mathbb R \setminus [-\pi,\pi]\}$
First observe that $f\in BL^2 \Rightarrow f\in L^2(\mathbb R) \Rightarrow \hat f \in L^2(\mathbb R)$
{$\hat f(\mathbb R)$ has bounded support and $\hat f \in L^2(\mathbb R)$} $\Rightarrow \hat f \in L^1(\mathbb R)$
For $ f\in BL^2$, taking the inverse Fourier transform $\mathcal F^{-1}:L^2(\mathbb R)\to L^2(\mathbb R)$ of $\hat f$ then gives a continuous function, hence $f$ has a unique continuous version, which we still denote by $f$.
(In fact this version is even an holomorphic function.)
It thus makes sense to consider $f(n)$. (This was not obvious as $f$ was a priori only considered to be an element of $L^2(\mathbb R)$.)
Now we write $\hat f |_{[-\pi,\pi]}\in L^2([-\pi,\pi])$ as a Fourier series:
$$\hat f (\xi)=\sum_{n\in\mathbb Z} c_n(\hat f) e^{in\xi}$$
with
$$c_n(\hat f) = \frac{1}{2\pi}\int_{[-\pi,\pi]}\hat f (\xi) e^{-in\xi}d\xi= \frac{1}{2\pi}\int_{\mathbb R}\hat f (\xi) e^{-in\xi}d\xi=\mathcal F^{-1} \hat f (n) = f(n)$$
with $(c_n(\hat f))_{n\in \mathbb Z}=(f(n))_{n\in \mathbb Z} \in \ell^2(\mathbb Z)$.
We thus get the formula
$$\hat f (\xi)=\sum_{n\in\mathbb Z} f(n) e^{in\xi}$$
as an equality in $L^2([-\pi,\pi])$, but then
$$\hat f (\xi)=\sum_{n\in\mathbb Z} f(n) e^{in\xi}1_{[-\pi,\pi]}(\xi)$$
where the series converges in $L^2(\mathbb R)$. We can thus take the inverse Fourier transform of both sides and obtain the equality
$$f (x)=\sum_{n\in\mathbb Z} f(n) \mathcal F^{-1}\big(e^{in\xi}\big|_{[-\pi,\pi]}\big)(x)=\sum_{n\in\mathbb Z} f(n) K(x-n)\qquad (*)$$
in $L^2(\mathbb R)$.
Now as a last remark we observe that for $u\in BL^2$, $\|u\|_\infty\leq \frac{1}{\sqrt{2\pi}}\|u\|_2$ as
\begin{align}
|u(x)|&=|\frac{1}{2\pi}\int_{\mathbb R}\hat u (\xi)e^{-i\pi x\xi}d\xi|\\
& = |\frac{1}{2\pi}\int_{[-\pi,\pi]}\hat u (\xi)e^{-i\pi x\xi}d\xi|\\
(Cauchy-Schwarz)\qquad & \leq \frac{1}{\sqrt{2\pi}} (\int_{[-\pi,\pi]} |\hat u (\xi)|^2d\xi)^{1/2}\\
& = \frac{1}{\sqrt{2\pi}}(\int_{\mathbb R} |\hat u (\xi)|^2d\xi)^{1/2}\\
(Plancherel)\qquad& = \frac{1}{\sqrt{2\pi}}\|u\|_2 \,.
\end{align}
Thus in $BL^2$ the convergence in $L^2$ implies the convergence in $\|\|_\infty$ and the formula $(*)$ is not only valid almost everywhere but for all $x$ in $\mathbb R$.
For more details see Willem, Analyse harmonique réelle, 1995. Section 6.3.