When atoms absorb radiation, their electrons get excited and gain energy to transition to higher energy levels, altering their electron configuration temporarily. When the electrons fall back to their original ground states, the energy is released as specific wavelengths of colour.