What properties enable carbon to form polymers and so many other compounds?
Carbon's ability to form four bonds.
Carbon has 4 valence electrons. Recall from your chemistry classes that valence electrons are the outermost shell of electrons in an atom, and most atoms (there are quite a few exceptions) want 8 electrons to become stable. Since carbon already has 4, it needs four more valence electrons to become stable.
There are a variety of ways carbon can get these 8 valence electrons. It can bond with 4 hydrogens (each hydrogen has 1 electron) to form methane:
It can also bond with two oxygens to form carbon dioxide, but most importantly, it can bond with other carbons. Since carbon can form so many different bonds, it often forms the backbone of long hydrocarbon polymers, like carbohydrates, and other long polymers:
See how in the above picture, the carbon atoms on the end form a bond with 3 hydrogens and 1 carbon, while the middle 2 carbons form bonds with 2 carbons and 2 hydrogens? This property means that carbon can form chains hundreds of atoms long, and carbon's ability to form four bonds allows it to constitute the backbone of long polymers.
In fact, carbon is so important that a whole branch of chemistry, organic chemistry, is dedicated to studying carbon-based molecules.
Now, if you are an extremely astute chemist, you may ask, "Shray, don't other elements like silicon also have 4 valence electrons?"
Yes, they do. In fact, scientists often consider finding silicon-based life forms on other planets, since the molecule can form 4 bonds, and therefore form polymers similar to the ones in our bodies. However, the reason life on Earth is carbon-based rather than silicon-based, and the reason we have carbon-based compounds is quite simple: Earth just has an abundance of carbon. In fact, many planets in the universe may have more carbon than silicon, since it is easier to synthesize in stars.
However, this doesn't eliminate the possibility of silicon-based life, a life form made of the same elements that are inside the device you are reading this post on right now. The question is, what would silicon-based life look like? While there are a lot of theories, nobody has actually encountered a silicon-based life form, and the world may never know what a life form that forms silicon polymers looks like.
For me, that's what makes chemistry so fascinating. A simple property like the number of electrons in carbon's valence shell can lead to such astounding hypothetical questions and possibilities that make us question our fundamental understanding of life itself.