Sulfur bacteria are lithotrophs, meaning they obtain energy by oxidizing inorganic compounds, such as hydrogen sulfide, to drive their metabolic processes.