Carbon is present in a wide variety of molecules because its atomic structure makes it extremely easy to form bonds. Carbon readily bonds with multiple other atoms, and it can form chains of bonds with other carbon atoms.
Carbon's outer valence shell contains four of a possible eight electrons. This allows carbon to bond with four other atoms simultaneously. For example, carbon can bond with four hydrogen atoms to form methane. Alternatively, carbon can bond with other carbon atoms and other atoms simultaneously. Two carbon atoms can bond with each other and each with three hydrogen atoms, forming C2H6. Finally, carbon chains including a massive number of carbon atoms can form in different structures; these create materials like coal and diamond, and they are the basis of nanotechnology.