A rotten-egg odor is commonly caused by hydrogen sulfide gas. It can come from the groundwater itself, from sulfur-reducing bacteria in the well, or from a reaction inside the water heater.
Options depend on the level and source. They include aeration, oxidation and filtration, and specialty media such as catalytic carbon, which is often used for hydrogen sulfide. Ask any seller what concentration their system is rated to handle, in writing.