Some local codes such as some found in New Jersey, may require what is called a bonding wire between the inlet copper pipe providing cold water and the copper pipe discharging hot water from the water heater.
Bonding wires are usually a heavy copper wire (e.g., #6 stranded) and fastened with brass clamps one end to the cold water pipe and the other to the hot water pipe. Some say the bonding wire can divert electrolysis which occurs often in plumbing using dissimilar metals, away from the anode rod and water heater tank itself as there can be a slight electrical potential between the hot and cold water pipes which may otherwise be carried by the water in the heater and accelerate corrosion.
So one argument is that the bonding wire may extend the life of the water heater components.
Another school of thought is that the bonding wire helps to complete the electrical ground of the plumbing systems (only the cold water line is connected to ground). However the National Electric Code does not require a bonding wire on a water heater so this does not seem to hold water, (pun intended).
At the end of the day, follow you're local code of course. As for installing a bonding wire if it's not required? Well, it can only help.