Electrons always have discrete energy levels, no matter whether they are in isolated atoms, in a multi-atom molecule, or in an extended lattice of atoms in a solid. The difference among these cases are the sizes of the energy differences separating the different energy levels available to the electrons in the system.