The energy carried by one photon is directly proportional to its frequency. So the photon energy is greatest for the electromagnetic waves with the highest frequency / shortest wavelengths.
That's why when you get past visible light and on up through ultraviolet, X-rays, and gamma rays, the radiation becomes dangerous ==> each photon carries enough energy to tear electrons away from their atoms, ripping molecules apart and damaging cells.
The photon with the highest energy is a gamma-ray photon.