Coral reefs are vital to marine ecosystems for several reasons. They provide a habitat and shelter for a wide variety of marine life, including fish, invertebrates, and plants. Coral reefs also help protect coastlines from erosion by reducing the impact of waves and storms. Additionally, they support local economies through tourism, fishing, and pharmaceutical research. Overall, coral reefs are crucial to maintaining biodiversity and the health of marine ecosystems.