Proof $\int \limits_{0}^{\infty}\left(\frac{\sin x}{x}\right)^2dx=\frac{\pi}{2}$ by definition
the Fourier transform of $\mathbb{I}_{[-1/2,1/2]}$ is $$\int_{-\infty}^\infty \mathbb{I}_{[-1/2,1/2]}(x) e^{-2 i \pi f x} dx = \frac{e^{- i \pi f} - e^{ i \pi f}}{-2 i \pi f} = \frac{\sin(\pi f)}{\pi f}$$
so the Parseval theorem for Fourier transforms let us know that
$$\int_{-\infty}^\infty |\mathbb{I}_{[-1/2,1/2]}(x)|^2 dx = 1 = \int_{-\infty}^\infty \frac{\sin(\pi f)^2}{\pi^2 f^2} df$$
now if you want to prove it with the Fourier series, consider the function $f_T(x) = \mathbb{I}_{[-1/2,1/2]}(x)$ for $x \in [-T/2;T/2]$ and $f_T(x) = f_T(x+T)$ :
$$c_T(n) = \frac{1}{\sqrt{T}} \int_{-T/2}^{T/2} f_T(x) e^{-2 i \pi n x / T}dx = \frac{\sin(\pi n/T)}{\pi n / \sqrt{T}}$$
$$f_T(x) = \sum_{n=-\infty}^\infty \frac{c_T(n)}{\sqrt{T}} e^{2 i \pi n x /T}$$ and the Parseval theorem for the Fourier series let us know that : $$\sum_{n=-\infty}^\infty |c_T(n)|^2 = \int_{-T/2}^{T/2} f_T(x)^2 dx = 1$$ so that :
$$\lim_{T \to \infty} \frac{1}{T}\sum_{n=-\infty}^\infty \frac{\sin(\pi n/T)^2}{\pi^2 (n/T)^2 } = \int_{-\infty}^\infty \frac{\sin(\pi x)^2}{\pi^2 x^2} dx= 1$$