Yes. In fact 2 diodes because the valve has 2 coils.
When the current to a coil is cut off, the coil generates a voltage in the opposite direction to the voltage when the current was on. It is this voltage you need to short out with the diode, so that it doesn't damage or interfere with the rest of the circuit. So the direction of the diode should be anode to ground and cathode to +12V. If you connect it the wrong way around, it will simply short circuit the 12V power supply when you activate the relay, damaging the power supply and probably blowing the diode.
A diode from the 1N400X range is suitable. Choose one with a current rating above the coil current.
Those diodes only protect the circuit from reverse voltage from the coils inside the relays themselves. They won't protect the circuit from reverse voltage from external coils attached to the relays.
Being opto-isolated can help protect, but if @aliglass has a common ground between the Arduino circuit and the 12V supply, then the opto-isolaton is pointless.
Slightly of-topic question: if higher rated diodes are the same price, why make a range that includes lower rated models? The others must have some advantages, I assume. Like maybe leakage current, voltage drop...?
I read somewhere that there are two ways of manufacturing. The 4005-4007 falling in the second group. The article stated that the 4001-4004 group has a slightly faster 'on' time. The 1N4004 is my go-to choice for low voltage projects, and the 1N4007 is only used for mains voltage.
I stock four diodes that cover most of my needs. 1N4148, 1N4004, 1N4007, 1N5819 (Schottky).
Leo..