A theoretical model for describing the emission spectra of microsphere cavities is presented, and its predictions of detailed lineshapes of emission spectra associated with whispering gallery modes (WGMs) of various orders in ZnO microspheres (MSs) are verified experimentally by photoluminescence (PL) spectroscopy. The interplay of Purcell effect, quality factor, and leaky modes in spontaneous and stimulated emission spectra related to WGMs of all orders is revealed. The key success of the theory is based on the expansion of the full Green function of the MS in terms of all possible resonance modes in complex frequency space, which allows incorporation of contributions from leaky modes, stimulated emission processes, and Purcell effect. We show that the spontaneous emission spectrum calculated according to Mie theory (without Purcell effect) is dominated by the contribution of leaky modes, while the spontaneous and stimulated emission enhanced by Purcell effect are responsible for the main WGM resonance peaks observed experimentally. It is found that the stimulated emission peaks are doubly enhanced by their respective mode quality factor Q: one factor from the Purcell effect and the other factor from the photon number derived from the rate equation. After combining all these effects the theory can provide a quantitative description of fine features of both TE and TM modes (including higher-order modes) observed in the PL spectra of ZnO MSs. Surprisingly, it is found that for ZnO MS with diameter larger than 5 µm, the PL emission spectrum is dominated by higher-order modes. The quantitative understanding of the interplay of these emission mechanisms should prove useful for optimizing the performance of light-emitting devices based on micro resonators.