 Energy and momentum are conserved only on the average in interactions between matter and radiation, but not in elementary processes such as absorption and emission. This allows one to reconcile the discontinuously changing energy of the atom (the jump between energy states) with the continuous release of energy as radiation.
