Naturally-occurring organic compounds are created when plant material decays in lakes and reservoirs. Those organic compounds frequently cause musty, earthy odors, especially toward the end of summer. The odors can be objectionable, but generally are not harmful to health. However, odors can be caused by other constituents as well, so you might want to call your local Health Department and mention the odor to them.
In some parts of the country, drinking water can contain hydrogen sulfide gas, which smells like rotten eggs. This can occur when water comes into contact with organic matter or with certain minerals, such as pyrite. This situation mostly occurs as groundwater filters through organic material or rocks.
The best way to find out what is in your water is to have the water tested by a state-certified laboratory. A list of these labs is available from your State Certification Officer, or from this EPA website.
Learn more: Drinking Water Taste and Odor