The relationship between species diversity and ecosystem functioning has been debated for decades, especially in relation to the "macroscopic" realm (higher plants and metazoans). Although there is emerging consensus that diversity enhances productivity and stability in communities of higher organisms; however, we still do not know whether these relationships apply also for communities of unicellular organisms, such as phytoplankton, which contribute approximately 50% to the global primary production. We show here that phytoplankton resource use, and thus carbon fixation, is directly linked to the diversity of phytoplankton communities. Datasets from freshwater and brackish habitats show that diversity is the best predictor for resource use efficiency of phytoplankton communities across considerable environmental gradients. Furthermore, we show that the diversity requirement for stable ecosystem functioning scales with the nutrient level (total phosphorus), as evidenced by the opposing effects of diversity (negative) and resource level (positive) on the variability of both resource use and community composition. Our analyses of large-scale observational data are consistent with experimental and model studies demonstrating causal effects of microbial diversity on functional properties at the system level. Our findings point at potential linkages between eutrophication and pollution-mediated loss of phytoplankton diversity. Factors reducing phytoplankton diversity may have direct detrimental effects on the amount and predictability of aquatic primary production.