The Bohr Model of the Atom  
The problem with finding out that electrons where capable of existing only at certain energy levels was coming up with a model to explain these levels.   In 1913 Neils Bohr (1885-1962), a Danish physicist, proposed a theoretical model for the hydrogen atom. He chose hydrogen because its atoms are the simplest, having only one electron about the nucleus, and because it produces the simplest spectrum with the fewest lines.  In his model, Bohr imagined the electron to move around the nucleus following fixed paths, or orbits, much as a planet moves around the sun. His model also restricted the sizes of the orbits and the energy that the electron could have in a given orbit.  The equation Bohr derived for the energy of the electron included a number of physical constants such as the mass of the electron, its charge, and Planck's constant. It also contained an integer, n, that Bohr called a quantum number. Each of the orbits could be specified by its value of n.
Bohr's Atomic Model
Bohr found that the electron had the least energy when n = 1. which corresponds to the first Bohr orbit. This lowest energy state is called the ground state. This orbit also brings the electron closest to the nucleus.

When the hydrogen atom absorbed energy, as it does in a gas discharge tube, the electron is raised from the orbit n = 1 to a higher orbit such as n = 2 or n = 3 or even higher.  Then when the electron drops back to a lower orbit, energy is emitted in the form of light. Since the energy of the electron in a given orbit is fixed, a drop from one particular orbit to another, say from n=2 to n=1, always releases the same amount of energy, and the frequency of light emitted because of this change in energy is always precisely the same.

Bohr's model of the atom was both a success and a failure.  It successfully predicted the frequencies of the lines in the hydrogen spectrum, so it seemed to be valid.  Nevertheless the model was a total failure when it tried to predict energy levels for atoms with more than one electron.  Still the theory held some validity and is still used to introduce students to the concept of orbital shells and the first quantum number "n".