Oxygen is crucial in wastewater treatment, mostly in the secondary stage, where oxygen input promotes the breakdown of organic matter and supports the growth of beneficial microorganisms.