This is an instance of Parseval's identity. Walsh-Hadamard transform is similar to any other discrete Fourier transform in this sense.
We have $$ f^w(a)^2=\left(\sum_{x\in\Bbb{F}_2^n}(-1)^{f(x)+\langle a, x\rangle}\right)\left(\sum_{y\in\Bbb{F}_2^n}(-1)^{f(y)+\langle a, y\rangle}\right)=\sum_{x,y\in\Bbb{F}_2^n}(-1)^{f(x)+f(y)+\langle a, x+y\rangle}. $$ So when you sum these over $a\in\Bbb{F}_2^n$ you should first change the order of summation so that in the triple sum $\sum_{x,y,a\in\Bbb{F}_2^n}$ you do the $a$-sum first. Then you can use orthogonality to see that the $a$-sum is zero unless $x=y$ in which case it is $=2^n(-1)^{f(x)+f(y)}$. But, when $x=y$ we have $f(x)+f(y)=0$. The claim follows.