The most common reason of this sulfur smell in hot water is the presence of a bacterium called Sulphate-Reducing Bacterium.
This bacterium loves hot water and hard water, which is why it is often found in homes that have a water softener and a water heater.
There are some ways to solve odor problems. As a temporary solution, you can do a treatment called chlorine bleach. This treatment should eliminate odors for a few months, but you will be forced to do so at intervals of 3 to 6 months.