Mangrove forests are crucial for coastal ecosystems for several reasons. They provide vital habitats and breeding grounds for a variety of marine species, including fish, crabs, and birds. Mangroves also act as a natural buffer against coastal erosion, storm surges, and tsunamis, helping to protect coastal communities from the impacts of extreme weather events. Additionally, mangrove trees help to filter pollutants and improve water quality, making them important for maintaining the overall health of coastal ecosystems.