I am being asked to figure out when $\mathbb Z_n$ is a semisimple ring. It is clear to me that if $n$ is prime then $\mathbb Z_n$ is simple, which implies it is semisimple.
If $n=p_1...p_n$ is a product of primes all having power $1$ (in other words, $p_i \neq p_j$ when $i \neq j$) then each $\mathbb Z_{p_i}$ is simple as $\mathbb Z$-module and by the chinese remainder theorem $$\mathbb Z_n=\mathbb Z_{p_1} \oplus ... \oplus \mathbb Z_{p_n}$$ where the member of the right is a direct sum of simple rings. However, it is not so clear to me whether if each $\mathbb Z_{p_i}$ is a submodule of $\mathbb Z_n$, so I don't know if I could conclude that $\mathbb Z_n$. I would like some help with this case and to consider if there is another possibility for $\mathbb Z_n$to be semisimple (if not, how could I prove these are the only two cases?).
Do you know that the Jacobson radical of a semisimple ring is zero?
If so, you can easily show that $n$ would have to be a squarefree positive integer for $\Bbb Z_n$ to have Jacobson radical zero.
You've already mentioned you have the converse that $\Bbb Z_n$ is a product of fields for a squarefree integer, so then you would have both directions.