The element that is responsible for the huge diversity of the molecules is CARBON.
Carbon is able to bring about these diverse molecules as a result of its atomic structure. Carbon has four electrons in its outermost shell which enables it to form different types of chemical bonds with different types of elements and with itself. The smallest molecule among the diverse molecules form by carbon is methane, all other molecules are bigger and more complex than methane.