Biodiversity of a community depends on the availability of food for consumers. If there is rich diversity in flora then more types of consumers can be supported in community.
When a community is at pioneer stage, lichens, bryophytes and pteridophytes are the main plants. These plants do not produce enough biomass which can sustain a diverse fauna. Hence, biodiversity would be limited at this stage.
When community reaches the climax; it is proliferated by gymnosperms and angiosperms. These plants produce enough biomass to sustain a diverse fauna. Hence, biodiversity increases at this stage.