The set of zero divisors is a prime ideal

The set of zero divisors in an arbitrary ring does not usually form an ideal.

Take, for example, any ring $A$ with a nontrivial idempotent $e$ (i.e. an element $e \notin \{0, 1\}$ such that $e^2 = e$). Then $e (1-e) = 0$, so $e$ and $1-e$ are zero divisors, but $(e, 1 - e) = A$, so the zero divisors of $A$ generate the unit ideal.

But whenever the set of zero divisors does form an ideal, it forms a prime ideal.

Indeed, let $A$ be a ring and $a,b \in A$ such that $ab$ is a zero divisor. Then $ab c = 0$ for some $c \not = 0$.

Case (i) $bc \not= 0$. Then $a$ is a zero divisor.

Case (ii) $bc = 0$. Then $b$ is a zero divisor.

A more natural way to phrase this is that the set of regular elements ( = non-zero divisors) forms a multiplicative set.

What you need to show, then, is that in a valuation ring the set of zero divisors does form an ideal.

This boils down to showing that if $a,b$ are zero divisors then (i) $a + b$ is a zero divisor and (ii) $r a$ is a zero divisor for any $r \in A$. Check that (ii) holds in any ring. So the focus in your problem is that zero divisors in a valuation ring are closed under addition.

EDIT with update to answer the comment of Batrachotoxin

In general the ideal generated by the zero divisors is not going to be a maximal ideal. Consider, for example, any valuation domain that is not a field. Meanwhile, in a field the zero divisors do generate the maximal ideal $(0)$.

It's also easy to produce examples of valuation rings which are not domains and in which the ideal generated by the zero divisors is maximal.

For example, consider the ring of dual numbers over a field $K$, $A := K[x]/(x^2)$.

A generic element of $A$ looks like $ax + b$, with $a,b \in K$. If $a,b \not= 0$ then $ax + b$ is a unit since it is the sum of a unit and a nilpotent element. Thus the ideal of non-zero divisors is principally generated by $(x)$, and this is the maximal ideal of $A$.