Understanding the effects of biodiversity on community persistence and productivity is key to managing both natural and production systems. Because rare species face greater danger of extinction, species evenness, a measure of how similar abundances are across species in a community, is seen as a key component of biodiversity. However, previous studies have failed to find a consistent association of species evenness with species survival and biomass production. Here we provide a theoretical framework for the relationship among these three elements. We demonstrate that the lack of consistent outcomes is not an idiosyncratic artifact of different studies but can be unified under one common framework. Applying a niche theory approach, we confirm that under demographic stochasticity evenness is a general indicator of the risk of future species extinctions in a community, in accordance with the majority of empirical studies. In contrast, evenness cannot be used as a direct indicator of the level of biomass production in a community. When a single species dominates, as expressed by the constraints imposed by the population dynamics, biomass production depends on the niche position of the dominating species and can increase or decrease with evenness. We demonstrate that high species evenness and an intermediate level of biomass production is the configuration that maximizes the average species survival probability in response to demographic stochasticity.