Where electromagnetic waves come from
Changes in atoms and in their nuclei can generate electromagnetic radiation over a wide range of frequencies. Gamma rays are emitted by changes in an atom’s nucleus. Other changes involving an atom can also produce electromagnetic waves. Radiation can be absorbed by atoms as well as emitted by them. In a diagram, take care to distinguish the whole atom from its small central nucleus. You do not need a formula for the energy of a single wave or particle here. The key idea is that changes within matter can transfer energy away as electromagnetic radiation.