As I already commented, the problem statement should be:
$n$ is prime if and only if ($[a][b] = [0] \implies [a] = [0]$ or $[b] = [0]$).
For the leftward direction: Prove this by contraposition: this means that if we want to prove $P \implies Q$, then we do so by proving $\text{not } Q \implies \text{not }P$ (these are equivalent). Hence I will prove the following: If $n$ is not a prime, then we have that $[a][b] = [0]$ and $[a] \neq [0] \neq [b]$. (since the we have that $\text{not }(K \implies L)$ is equivalent with ($K$ and $\text{not } L$).
First of all, note that $n$ is prime if and only if its only divisors are $1, n$. Hence $n$ is not prime if it has at least one divisor (and then automatically also a second one) which is neither $1$ nor $n$!
Now for your proof:
Suppose $n$ is not prime, then there exists divisors $a,b$ of $n$ which are by definition different from 1 and different form $n$. Hence we can write $n = ab$. In particular, we have that since $ 1 < a <n$ and $1 < b <n$ that $[a] \neq [0]$ and $[b] \neq [0]$ in $J_n$. However, we have that $$[0] = [n] = [ab] = [a][b]$$ and this concludes the prove.