Self-organization, the formation of spatial patterns due to ecological interactions, is a widespread phenomenon in natural ecosystems. Theoretical studies indicate that self-organization is an important regulating process in ecosystems. For instance, it can make ecosystems more resistant to disturbance. Studying these emergent effects of self-organization helps us manage and protect nature against climate change and human impacts. In this thesis, I studied spatial self-organization of vegetation in rivers. In particular, I focused on the interaction between water flow and submerged vegetation, and its effects on river flows and biodiversity. My research indicates that vegetation buffers river ecosystems against changing hydrological conditions. These hydrological conditions can range from low flows to high flows (floods). At the same time, submerged vegetation supports the river's biodiversity. By maintaining habitat diversity, it creates conditions that are favourable for other species. Hence, this self-organization process might provide a nature-based solution to flow regulation. These findings suggest there might be a need to reconsider current management practices that typically remove vegetation because it is perceived to increase the risk of river flooding. As global climate change and human modifications to rivers are expected to increase hydrological extremes, this study shows how self-organized river ecosystems can adapt to maintain suitable flow conditions while also supporting high aquatic biodiversity.