The light which atoms give off is made up of specific wavelengths, called lines; observed by a spectroscope, the lines are, collectively, atomic spectra.
In more detail …
In an atom, electrons have specific and discrete energies. There are many more energy states (or levels) in each atom than there are electrons. When an electron transitions (‘jumps’) from one energy level to another, it emits (if going from a higher level to a lower one) or absorbs (vice versa) light – a photon – with a discrete, specific wavelength. In any given set of conditions (pressure, temperature, magnetic field strength, etc), the collection of all those specific wavelengths is the spectrum of the atom … so atomic spectra are the spectra of atoms!
As the atomic electron energy levels are unique to each element, the lines in a spectrum (emission or absorption) can be used to identify the elements present in the source (a star, say) or gas between the source and us (e.g. the interstellar medium). Of course, for an extragalactic object – a quasar, perhaps – you need more than one line to make a certain identification … because the universe is expanding (and so you don’t know how much just one line may have been redshifted).
The light electronic transitions in atoms produces may not be in the visual part of the electromagnetic spectrum, but for atoms that are neutral or have lost only one or two electrons (yes, ‘atomic spectra’ refers to the line spectrum of ions too!), most lines are in the UV, visual, or near infrared. For highly ionized atoms, the lines are found in the extreme UV or x-ray region.
As the relative intensity of the lines in an atomic spectrum varies with temperature, analysis of the lines in the spectrum of a star (say) can give an estimate of the temperature of the star’s surface (photosphere). The width of the lines depends on the pressure of the gas; the structure of the lines depends on the magnetic field strength; the … (you get the idea) – atomic spectra are a wonderful window into the physical conditions of places far, far away!
Looking for more? This University of Oregon webpage has a good, brief, description of atomic spectra; and Physics Lab’s Atomic Models and Spectra covers both the historical context and a bit more of the theory.
As atomic spectra play such a vital role in optical astronomy, no wonder there are so many Universe Today articles involving atomic spectra! Here’s a random selection: New Study Find Fundamental Force Hasn’t Changed Over Time, Spitzer Discovers Early Galaxy Forming Region, and Strange Nebula Around Eta Carinae .
The Astronomy Cast episode Energy Levels and Spectra is all about atomic spectra. Other Astronomy Cast episodes well worth a listen, in regard to atomic spectra, include Optical Astronomy and In Search of Other Worlds.