The frequency of electromagnetic waves, including visible light, X-rays, and gamma rays, is determined by their energy. In the electromagnetic spectrum, gamma rays have the highest energy and frequency, followed by X-rays, and then visible light.
The energy of electromagnetic waves is directly proportional to their frequency. Higher-frequency waves carry more energy per photon. In other words, gamma rays have higher energy photons than X-rays, and X-rays have higher energy photons than visible light.
Visible light falls within a specific range of frequencies that our eyes are sensitive to. These frequencies are lower than those of X-rays and gamma rays, hence the lower energy of visible light photons compared to X-rays and gamma rays.
The relationship between frequency, wavelength, and energy is governed by the equation E = hf, where E is the energy of a photon, h is Planck's constant, and f is the frequency of the wave. Since gamma rays have the highest frequency, they also have the highest energy per photon, while visible light has lower frequencies and lower energy.