Plane electromagnetic waves do not have discrete energy levels. They are characterized by continuous spectra of frequencies and energies. The energy of a photon is indeed given by the equation E = hf, where E is the energy, h is Planck's constant, and f is the frequency of the wave. This equation shows that the energy of a photon is directly proportional to its frequency.
However, it's important to note that quantization occurs at the level of individual photons, not the wave itself. In the context of quantum mechanics, light is described as a collection of particles called photons. Photons are quantized packets of energy, and each photon carries an amount of energy that depends on its frequency.
When a photon is emitted or absorbed by an atom or an electron, the energy exchange occurs in discrete amounts determined by the energy difference between the initial and final states of the system. This phenomenon is known as quantized energy transitions or emission and absorption spectra. The discrete energy levels arise from the discrete energy states available to the atom or electron.
In summary, the energy of individual photons can vary continuously, but the exchange of energy between matter and electromagnetic waves occurs in discrete amounts when considering specific energy transitions in atomic or electronic systems.