system
Given the following post, respond as if you're commenting on Reddit:
human
Could someone explain band gaps?

Its been brought up in a couple of my classes, but I've never really understood it.
gpt
So when you have one atom you have distinct energy levels that electrons can occupy.  The electron can have these allowed energies, but not any others. 

When you have two atoms bound and sharing electrons, the energy levels combine in such a way that two atomic orbitals of similar type end up going from orbitals of similar energy to molecular orbitals, one of lower energy and one of higher energy.  In the simplest case you have a homodimer where two atomic orbitals of energy E combine to two molecular orbitals of energy E-g and E+g.  Of course the electrons are going to roll downhill and land in the lower energy molecular orbital (E-g, known as the bonding orbital) and leave the other (E+g, antibonding) empty.  As a result the electrons in the molecule end up with lower energies than the electrons in the separate atoms.  See Molecular Orbital Theory for more of this.  

Add more and more atoms and more and more molecular orbitals get combined together.  Each orbital has to be a tiny bit different from the others, so after you start piling lots of electrons in there you end up with just a band of bonding and a band of antibonding orbitals. The difference in energy between those two is the band gap.

Electrons in the lower band (bonding orbitals, known as the valence band) are basically stuck in place but those in the upper band (antibonding orbitals, conduction band) can move about as electron-hole pairs.  If the band gap is small then ambient temperature is enough to promote electrons up to the conduction band, where they are free to move about, as in metals.  If the band gap is huge, then there needs to be a big voltage put in to promote an electron to the conduction band for the electron to move and yield a current.  This makes an insulator.  In between are semi-conductors, where it takes a small voltage to promote an electron and yield a current.