We show in this paper that the quantized energies of light in vacuum can be derived directly from the classical
electromagnetic theory through the consideration of statistics based on classical physics, which are just a series of
expectation values corresponding to relatively stable statistic distributions of electromagnetic harmonic oscillators.
Therefore, the quantization of energy is an intrinsic property of light as a classical electromagnetic wave and has no need
of being related to particles. The theory developed in this paper is also used to derive the energy equipartition theorem
and the discrete levels of hydrogen atom from classical mechanics.