Conduction in solids

When atoms form a solid, the energy of the more tightly bound electrons changes very little, and these electrons remain localized about a single atom.  The less tightly bound electrons do not remain localized, and their possible energy values now fall into bands of allowed values separated by gaps.

The highest lying band containing filled states (as T --> 0) is called the valence band.
The lowest lying band band containing empty states (as T --> 0) is called the conduction band.

Metals (conductors) have no gap between the valence and the conduction band. The two terms refer to the same band.

Insulators have a large gap between valence and conduction band.  In an insulator, the valance band is totally occupied, but the conduction band is empty.

Semiconductors have a small gap between the valence and the conduction  band.  In a semiconductor the energy gap between the valence and the conduction band is small, and at higher temperatures some electrons can gain enough energy from thermal agitation to lift them from the valence band to the conduction band.  The valence band now contains holes, i.e. some states in that band are empty, and the conduction band is no longer totally empty, but contains some electrons.  Both bands can contribute to the conduction of current, but the conductivity is low, because the number of unoccupied states in the valence band and the number of occupied state in the conduction band is small.
The resistance of semiconductors decreases as the temperature increases.  In conductors, the resistance increases as the temperature increases.

Doping a silicon and germanium semiconductor with impurity atoms with 5 valence electrons produces n-type semiconductors by contributing extra electrons into empty energy levels just below the conduction band.
Doping a silicon and germanium semiconductor with impurity atoms with 3 valence electrons produces p-type semiconductors by leaving empty energy levels just above the valence band.

When a p-n junction is formed, some of the free electrons in the n-region diffuse across the junction and combine with holes to form negative ions.  In so doing they leave behind positive ions at the donor impurity sites.   A depletion region containing no free electrons and holes forms near the junction.

Reverse biasing the junction, i.e. connecting the positive terminal of an external power supply to the n-type side and the negative terminal to the p-type side will increase the size of the depletion layer.  The external field will pull free electrons in the n-type material and and holes in the p-type material away from the junction.  If a photon strikes the p-n junction and creates an free electron-hole pair in the depletion layer, then the electron will be accelerated towards the n-type and the hole towards the p-type side.  If many photons create electron-hole pairs, a pico-ammeter connected across the junction will register the flow of a small current.  This current crosses the junction from the n-type to the p-type material.

An ordinary diode is forward biased.  Connecting the positive terminal of an external power supply to the p-type side and the negative terminal to the n-type side allows a current to flow across the junction from the p-type to the n-type material.  Electrons and holes recombine.  During the recombination energy is released.  It can be released in the form of heat, or in the form of light, as in LED's and Laser diodes.