Question: how gamma rays are produced?
Answer: Gamma rays are produced in the disintegration of radioactive atomic nuclei and in the decay of certain subatomic particles. ... When an unstable atomic nucleus decays into a more stable nucleus (see radioactivity), the “daughter” nucleus is sometimes produced in an excited state.