Lets say that there is an disease or infection on a certain species, if the community was not very diverse then that whole species will be effected because they are all alike. This can lead to an extinction of that species which then leads to the a possible collapse in the community due to the change in food webs.
More diversity equals to more stability because these risks have a fewer chance of happening.
I hope all of that makes sense(;