  We study the temporal correlations of the field emitted by an electromagnetic
resonator coupled to a mesoscopic number of two-level emitters that are
incoherently pumped by a weak external drive. We solve the master equation of
the system for increasing number of emitters and as a function of the cavity
quality factor, and we identify three main regimes characterized by well
distinguished statistical properties of the emitted radiation. For small cavity
decay rate, the emission events are uncorrelated and the number of photons in
the emitted field becomes larger than one, resembling the build-up of a laser
field inside the cavity. At intermediate decay rates (as compared to the
emitter-cavity coupling) and for few emitters, the statistics of the emitted
radiation is bunched and strikingly dependent on the parity of the number of
emitters. The latter property is related to the cooperativity of the emitters
mediated by their coupling to the cavity mode, and its connection with steady
state subradiance is discussed. Finally, in the bad cavity regime the typical
situation of emission from a collection of individual emitters is recovered. We
also analyze how the cooperative behavior evolves as a function of pure
dephasing, which allows to recover the case of a classical source made of an
ensemble of independent emitters, similar to what is obtained for a very leaky
cavity. State-of-art techniques of Q-switch of resonant cavities, allied with
the recent capability to tune single emitters in and out of resonance, suggest
this system as a versatile source of different quantum states of light.
