Likely cause is Sulfate Reducing Bacteria (SRB). To learn more about it and the solution to the problem go to http://www.ironproblems.com
If the odor is in the hot water only then a likely cause could be the Magnesium Anode Rod in the water heater. Solution is to replace that rod with an Aluminum Anode. The water heater should be shock chlorinated before putting back into service. All of this is best done by a plumber.