Atoms can both absorb electromagnetic radiation and emit it as well. If a sample of gaseous atoms is electronically excited with either light or heat, the atoms will emit light energy which can be measured and recorded on a line emission spectrum. When looking at a line spectrum, you will see very sharp, specific lines on the spectrum which correspond to very specific wavelengths of light. So atoms don't emit random, widespread wavelengths of energy, but instead very sharp, specific wavelengths that are reproducible and can be used to identify specific atoms. Scientists knew that most of the mass of an atom was taken up in the positively charged nucleus. But the nature of electrons in an atom was more of a mystery. Emission spectra showed scientists that the wavelengths corresponded to the difference in energy levels between electrons in an atom. When an atom absorbs energy, an electron is placed in an excited state and moves to a higher energy level orbital. Then, when the electron relaxes back to its ground state, the electron drops back to its regular orbital. So with this information coupled with the emerging field of quantum mechanics, that lead scientists to be able to understand the nature, shape, and energy levels of electrons surrounding the nucleus in atoms.