The physical principles of semiconductor devices can be understood by considering quantum energy levels in the material. I will just give a sketchy view here and define some terminology.
Valance electrons are the electrons outside the closed shells of an atom.
In silicon and germanium there are four valence electrons, arsenic has five and gallium three. The large number of valance electrons favour these elements as semiconductors. To sustain an electric current, a material must have charge carriers that are free to move. There is some probability that an atom may eject a valence electron which is then free to move in the material. The conductivity of a material is thus a function of the number of free charge carriers per unit volume.