Protists play essential roles in ecosystems as primary producers, consumers, and decomposers. They are crucial in nutrient cycling, food webs , and oxygen production, impacting the balance and sustainability of natural environments.