You have a good grasp of the photoelectric effect: electrons absorb energy from light and move up to a higher "excited" state, leaving lower energy levels unoccupied. The process of dropping back down to the ground state releases energy in the form of a photon. Hund's rule, however, only applies...