I am trying to find all $n$ such that $\mathbb Z_n$ is a $\mathbb Z[i]$-module, where $\mathbb Z[i]$ is the ring of Gaussian integers.
I proved that any $\mathbb Z[i]$-module $M$ is just an Abelian group with hommomrphism $\psi:M\rightarrow M$ and $\psi^2=-I_M$ .
Since $M=\mathbb Z/n$ as a group is cyclic generated by $1$, an endomorphism $\psi:M\rightarrow M$ is determined by $\psi(1)$. If $\psi^2=-I_M$, then $a^2=-1$ in $M$.
Thus, you're looking for all $n$ such that there is $a\in \mathbb Z$ such that $a^2 \equiv -1 \bmod n$.
For instance, when $n$ is prime, this means that $n \equiv 1 \bmod 4$. But there are other solutions.
The full answer is the numbers $n$ whose prime divisors are all congruent to $1$ mod $4$, with the exception of at most a single factor of $2$.