Transformation of electromagnetic potential under local U(1) transformation 
Let $\mathcal{L}=-(\partial _{\mu} \Phi^*)(\partial ^{\mu} \Phi)$
With $\Phi , \Phi^*$ being complex fields.

When looking at local U(1) transformations in class, we saw that $\mathcal{L}$ is not invariant under the transformations of the form $\Phi \rightarrow e^{i\theta(\mathbf{x})}\Phi$.
So we introduced covariant derivatives $\partial^{\mu} \rightarrow D^{\mu}=\partial^{\mu}-iA^{\mu}(\mathbf{x})$
As an exercise we should determine how $A^{\mu}$ has to transform to make $\mathcal{L}$ invariant.
I got $A^{\mu} \rightarrow A^{\mu}+\partial^\mu \theta$ as a result. I also showed that  $\mathcal{L}$ is indeed invariant under this transformation.
Now what I am wondering is, how can I interpret the transformation of $A^{\mu}$? I haven't had electrodynamic classes so I don't really know much about electrodynamic potentials, but I think it might have something to do with U(1) transformations being rotations (atleast I think, they are).
 A: In a second semester electrodynamics course you would learn about the gauge freedom of electromagnetism. If you have electric and magnetic fields $\textbf{E}$ and $\textbf{B}$ these are determined by the 4-vector potential A. However there is no single A that determines $\textbf{E}$ and $\textbf{B}$ uniquely. This is merely a more complicated version of in Newtonian gravity how you can always add a constant to the potential without changing the dynamics.
Given the $\textbf{E}$ and $\textbf{B}$ fields are contained in an antisymmetric tensor F,
$$F^{\mu\nu} = \partial^\mu A^\nu - \partial^\nu A^\mu $$
you can see for example that $F^{00} = 0$, $F^{01} = \partial^0 A^1 - \partial^1 A^0 = E_x$, etc. Now if you add a divergence term to your 4-vector potential,
$$ A'^{\mu} = A^{\mu} + \partial^{\mu}f$$
we can compute the new $\textbf{E}$ and $\textbf{B}$ fields,
\begin{align}
  F'^{\mu\nu} &= \partial^\mu A'^\nu - \partial^\nu A'^\mu \\
  F'^{\mu\nu} &= \partial^\mu (A^\nu +\partial^{\nu}f) - \partial^\nu (A^\mu + \partial^{\mu}f)\\
  F'^{\mu\nu} &= F^{\mu\nu} + \partial^\mu \partial^{\nu}f - \partial^\nu \partial^{\mu}f\\
  F'^{\mu\nu} &= F^{\mu\nu}.
\end{align}
So the vector potential is only well defined up to an overall divergence term. Now specifically towards your question, you found that you need the vector potential to transform by a divergence to impose local U(1) symmetry,
$$ A^{\mu} \rightarrow{} A^{\mu} + \partial^{\mu}\theta(x) $$ 
but this would leave the $\textbf{E}$ and $\textbf{B}$ (along with energy, momentum, interactions) unchanged.
