That is, the energy of each electron can only take on certain values. However, when you put more than one electron in an atom, there's a new phenomenon that shows up. When you lift up an object, and then drop it, it falls down. As it does this, its potential energy decreases. This is a general feature of all forces.
Objects tend to lose potential energy whenever possible.
When you apply this to an atom, you might guess that an electron might do the same thing. In fact, this happens. The electron in a hydrogen atom that's in an excited state will drop down to a lower energy state, and eventually to the ground state. If an atom has lots of electrons, as most atoms do, you might then expect that all the electrons will drop down to the ground state and stay there. It turns out, though, that this doesn't happen.