In order to get a generating functional for electromagnetism, we use integration by parts to obtain:
$$S = -\frac14 \int d^4 x \ (\partial_\mu A_\nu - \partial_\nu A_\mu)(\partial^\mu A^\nu - \partial^\nu A^\mu) \\ = \frac12 \int d^4 x \ A_\nu(g^{\mu\nu} \square - \partial^\mu \partial^\nu)A_\mu .$$
Then, we have that $\Pi^{\mu\nu} =g^{\mu\nu} \square - \partial^\mu \partial^\nu$ in momentum space is $\widetilde{\Pi}^{\mu\nu} = k^2 g^{\mu\nu} - k^\mu k^\nu$ which has an eigenvector $k^\nu$ with eigenvalue $0$. This is enough to show that the operator is singular, since the kernel has more than one element.
Quoting and Peskin and Schroeder p. 295:
This difficulty is due to gauge invariance. Recall that $F_{\mu\nu}$, and hence $\mathcal L$ is invariant under a general gauge transformation of the form $$A_\mu(x) \to A_\mu(x) + \frac1e \partial_\mu \alpha(x). $$ The troublesome modes are those for which $A_\mu(x) = \frac1e \partial_\mu \alpha(x)$, that is those which are gauge equivalent to $A_\mu(x) = 0$.
I don't quite understand why this implies that the operator must be singular. Am I just setting $\widetilde A_\mu(x) = k^\nu$ in momentum space to get that there must be more than one element in the kernel in momentum space?