When a spontaneous radioactive reaction happens, there is an emission of gamma rays (in most cases) What causes this emission?
Nuclei have energy levels just like atoms do, but while the energy level spacing in atoms is around the energy of visible light, the energy level spacing in nuclei is around the energy of gamma rays. So while an atom may relax from an excited state to the ground state by emitting visible light, when a nucleus relaxes from an excited state to a ground state it emits gamma rays.
When a nucleus undergoes radioactive decay the daughter nuclei are often created in an excited state, and they subsequently relax to the ground state and emit gamma rays. See the Wikipedia article on gamma decay for more details.