My understanding of the atomic structure is that electrons can gain energy in quantas, so that's why we have orbitals with sharply defined energy around the nucleus. One would logically think that every atom of the same element has the exact same orbitals with the exact same energy of orbital as the next atom, but as it turns out similar orbitals differ slightly from atom to atom. That's why when atoms join to form a lattice the orbitals join each other, get dense and form a band not a single big orbital. So, why do similar orbitals in different atoms of the lattice have slightly different energy?
Possible energy levels (quantas) are derived from Schroedinger's equation. The equation has a dependence on the distribution of potential energy. In a lonely atom this is fairly simple. If an electron is further from the nucleus it will have more potential energy. Solutions to Schroedinger's equation will yield simple orbits in this case. In a crystal, or any kind of solid, the distribution of potential energy gets complex because electrons can be attracted the nuclei of more than one atom since neighboring atoms are close. Now the solution to the Schroedinger equation will yield bands of possible energy states for the electrons. In some cases there will also be dead zones between bands where there is no possible energy level for an electron to occupy. It's called the band gap. In some cases it takes plenty of energy to get an electron to jump that gap into a state where it can conduct current. That makes the solid an insulator. In some cases it only takes moderate energy to jump the gap. This is a semiconductor. In metals there is no dead zone between conducting and non-conducting states for electrons. For semiconductors, thermal energy will cause electrons to randomly jump into states where they can conduct current across the solid.
While Okefenokee's response is correct, I don't think it answers the question, namely: The answer is simply the Pauli exclusion principle. This principle states that no two fermions (such as electrons) can share the same quantum state. In a gas this isn't an issue since free electrons (if there are any) are not co-located. In a crystal lattice, however, the atoms are very close and it turns out as you bring atoms closer and closer their allowed energy (quantum levels) change very slightly so that they are not identical to another nearby electron. With just two or a few electrons you would see the possible energy states of the electrons in the outer shell of the atoms bifurcate into a few lines. Bring together enormous numbers of electrons like in a solid and now these discrete lines kind of blur into bands. We call these blurred collections of quantum states "energy bands". We call the most lightly bound states in the outer shell the valence band and the lower energy "free" states the conduction band. If the bands overlap, the solid is a metal. If they are far apart, the solid is an insulator. If the bands are close, but not overlapping (close meaning within a few eV or so), the material is a semiconductor. In a nutshell this is the quantum theory of solids.
Right on! This is what I was trying to understand but to no avail after two days of googling! Thanks!
There is a lot to be said for studying Physics from a Text Book which tends to present things in a (universally accepted) suitable order. Pauli comes way before Solid State Physics (For me there was at least a year in between. It is risky to pick your way (via Google) through Physics, from place to place, in topics that you find entertaining and 'easy'. It is a great temptation to do that, I know but you need all the shots in your locker when you move on to the next step.
The most intuitive explanation is to understand atom-to-atom coupling equations in mechanical or electrical domains. You don't strictly need to grok Schrödinger's per se except to know it's a wave equation that has "solutions" that can be polynomials of some form. If you have one atom, you get the discrete energy levels everyone learns in physics class such as the classic spectra. When you have two atoms interacting/coupling, the solutions to these "split" into two energy solutions. This is akin to how linear equations give you one solution but quadratic equations give you two solutions with a ± relationship (remember this in the quadratic solution). As you add more N atoms, you get N split energy levels. The solution is effectively an Nth order polynomial so there are N-1 ± splits occurring. As N approaches Avogradro's number, these split levels become so dense they are simply called "bands". Strictly the levels are explicitly discrete but so numerous they act effectively like a continuous band of energy levels.
I'm not studying from Google I'm just using it as a supplement to find answers to holes in formal textbooks (there are astounding holes BTW). I'm formally studying electrical engineering at the university. I very much agree with you that a correct basis in science is only attainable from textbooks and a correct curriculum
Thank you very much for this. My reply is now late but back at the time when I first read it it clarified things even futher