The energy of an electromagnetic (EM) waves can also be treated as particles known as photons.
The energy of each photon is directly proportional to the frequency of the EM wave. The expression for the energy is, , where, is the energy, is Planck's constant and is the frequency.
An electromagnetic wave with a higher frequency will naturally have more energy.
Hence, the EM wave with the most energy is gamma wave, which has the highest frequency.