Sulfate-reducing bacteria produce a compound called hydrogen sulfide, which taints the water with a rotten egg odor. According to Greensboro Water Resources, the bacteria are not typically harmful but should be dealt with as soon as possible. Legionella, the bacteria that cause Legionnaire's disease, may also colonize hot water heaters and pose a more significant health risk.
Higher temperatures kill bacteria or prevent them from multiplying. According to the website TreeHugger, Legionella bacteria may survive but not grow at temperatures of 122 to 131 degrees Fahrenheit; they will die at temperatures above 131 degrees. The Canada Safety Council notes that at temperatures below 122 degrees, there is an increased risk of colonization by Legionella. According to the Ohio State University Extension, raising the temperature will help eradicate sulfate-reducing bacteria as well: These bacteria will die off at temperatures above 140 degrees.
Despite the benefits, raising the temperature on the hot water heater poses serious risks. If the water is too hot, it could scald residents or guests, and it's especially likely to jeopardize the elderly and infirm as well as small children. The Occupational Health and Safety Administration recommends that you refrain from setting your water heater to 140 or above if you live with small children or people who are elderly, unless you have people living with you who are at high risk of contracting the disease. OSHA also recommends installation of a scald-prevention device.