Carbon has four electrons in its outer electron
level (2 in 2s, 2 in 2p).
Campbell and Reece
Carbon, it turns out, is basically equally happy
giving four electrons away, or taking four
in. This allows "covalent" bonds
(CH4) as well as "ionic" bonds
(CO2, in which carbon double bonds with
each oxygen).
Carbon also has four bonding sites. Thus, it can
bond with up to four different elements/molecules.
This gives you a lot of possibilities!
Carbon can also bond to itself, making sheets
(graphite), lattices (diamonds), rings
(aromatics), and chains.
But why carbon and not silicon? You recognize
that all these properties should also apply
to silicon .. and germanium .. and
tin .. and lead!