Well, all of this we owe it to Bohr who analyzed the atomic emission spectrum of hydrogen and he could probe matematically that it was a result of movement of e- from an especific energy level to a lower one. The understanding of levels of energy took to the development of the atomic theory