When an electron relaxes to a lower energy state in an atom, it emits photons. But why does it produce only electromagnetic energy and not other forms of energy? For example, why doesn't it emit a Z boson, or simply increase in mass?
At the energy scales of an atom, the photon is the only thing of all the things the electrron can theoretically couple to in the Standard Model that can be produced at the available energy. Producing other particles, such as a Z boson or an electron-positron pair, can't happen because their mass is too learge.
And an interaction other than producing another particle really isn't possible in quantum field theory. You say "simply increase in mass", but all electrons have the same mass. There are no "heavy" and "light" electrons, an electron is an electron is an electron.
Of course, this answer is somewhat circular: The reason our theoretical models don't allow something else is because we don't observe that the electron does something other than emit a photon, that is, one could imagine theories where the electron emits other particles, but those simply don't describe out world. There is no fundamental principle that says that electron may only emit photons, that's just the way our world is.