In 1913, Niels Bohr revised Rutherford's model by suggesting that the electrons orbited the nucleus in different energy levels or at specific distances from the nucleus.
By doing this, he was able to explain that, since particular chemicals produce flames of a specific colour when burning, the pattern of energy released by electrons in the chemical reaction must be the same for every single atom of that element.
Therefore, electrons cannot be arranged at random, but they must have fixed levels of energy within each type of atom.
Bohr's 'solar system' model of the atom is the way that most people think about atoms today.
When atoms absorb energy, the electrons become excited and electrons at a particular level are pushed up to higher levels (at bigger distances from the nucleus). In time, they drop back down to a lower level releasing electromagnetic radiation of definite frequencies.