When Bohr made a model of the atom, he realized that the electrons are moving very fast around the nucleus in fixed orbits or more commonly called electron shells.
Arranging the electrons

The last filled electron shell or outermost shell of an atom is called the valence shell. Any electrons in this outermost shell is called valence electrons.
It is the valence electrons which will determine the chemical property of the atom.
​
The further away the electron shell is from the nucleus, the higher the energy associated with this energy shell.
Video 1
Arrangement of atoms' electrons and the Periodic Table

The picture above shows the electronic configurations of the first 20 elements (Based on Bohr's Model).
The horizontal rows are called periods and the vertical columns are called groups.
Notice anything unique about the arrangement (in terms of valence electrons with regards to group number as well as across the period)?
Determining the energy levels of the electron shells
To understand the electron shells better, a flame test is used. The flame test is used to detect mainly metal ions in a given compound and each element has a distinct emission spectrum, making identification easy. For the test, different substances are heated and thereafter, using a detector, the light given off by the heated ions are then measured and recorded as an emission spectrum (visible light seem against a black background). [The reverse can also be considered an absorption spectrum whereby black lines are seen in the visible spectrum, indicating the energy absorbed by the atoms.]



How this works is on the basis that each shell has a quantized (fixed) energy level. Before heating, the electrons orbit around the nucleus at fixed energy levels (also known as ground state).
Upon heating, electrons gain a fixed amount of energy and ‘jump’ to a new energy level (also known as the excited state). However, the excited electrons cannot orbit at this higher energy level and thus would lose energy (either in one step or series of steps).
For example: a single electron in n=1 can gain energy and be promoted to n=3. When losing energy, this excited electron can
-
lose energy and return to n=1 immediately (in one step) or
-
lose energy to go to n=2 before losing energy to return to n=1 (series of steps).


Based on the energy emitted after repeated studies, scientists could then determine the wavelengths at which these wavelengths were associated with.
​
In general, each electron shell has a fixed energy level and thus the jump from a lower electron shell to another electron shell (when this electron has gained sufficient energy). Likewise, as the electron loses energy, it will transit from higher electron shell of higher energy level to back to its original electron shell by releasing the energy it had gained as light energy.
From here, it is then easy to determine the wavelength of that emitted energy and thus the colour observed.
All these jumps result in the formation of a spectrum of lines seen in the emission spectrum and it was from this spectrum that scientists could determine the presence of the electron shells and their respective energy levels. Hence when we fill up the electrons into the atom, we always start with n=1 (with 2 electrons maximum) as it has the lowest energy level
Some of these lines are part of the visible part of the spectrum and the final colour observed in the flame is a combination of all the visible colours. Each element has its own distinctive colour seen in the flame test (depending on if you are doing an absoption or emission spectra.
