Semiconductor quantum dots in photonic cavities are strongly coupled light-matter systems with prospective applications in optoelectronic devices and quantum information processing. Here we present a theoretical study of the coupled exciton--light field dynamics of a planar quantum dot ensemble, treated as two-level systems, embedded in a photonic cavity modeled by Maxwells equations. When excited by coupling an external short laser pulse into the cavity, we find an exciton-polariton-like behavior for weak excitation and Rabi oscillations for strong excitation with a sharp transition between these regimes. In the transition region we find highly non-linear dynamics involving high harmonics of the fundamental oscillation. We perform a numerical study based on the Finite-Difference-Time-Domain method for the solution of Maxwells equations coupled to Bloch equations for the quantum dots and also derive an analytical model to describe the coupled cavity-quantum dot system, which allows us to describe the light field dynamics in terms of a Newton-like dynamics in an effective anharmonic potential. From the shape of this potential combined with the initial conditions the transition can be well understood. The model is then extended to a broadened ensemble of quantum dots. For weak excitation the polariton spectrum broadens and the lines slightly shift, however, the sharp transition to the Rabi oscillation regime is still present. Furthermore, we find a second, lower threshold with additional lines in the spectra which can be traced back to Rabi oscillations driven by the polariton modes. Our approach provides new insights in the dynamics of both quantum dot and light field in the photonic structure.