If $V$ is an irreducible affine variety, then $I(V)$ is prime.
A quick search on the site, I have found questions on the other direction (prime ideals implies irreducibility) but not in this direction.
I have translated the defintion of irreducibility to a condition on ideals: if $V_1$ and $V_2$ are subvarieties of $V$ such that $I(V) =I(V_1)\cap I(V_2)$, then $I(V)$ equals to $I(V_1)$ or $I(V_2)$.
Now to show that it is a prime ideal, suppose $fg\in I(V)$. My idea is to construct two ideals where each contains one of $f$ and $g$. I have tried putting $I_1 = I(V(f) \cap V) $ and so on but it doesn't work so far. Any hint on how I could continue?
Hint: $V(fg)=V(f)\cup V(g)$ and $V=V\cap V(fg)=(V(f)\cap V)\cup (V(g)\cap V)$. This implies that $V(f)\cap V=V$ or $V(g)\cap V=g$.