Carbon is central to biological molecules because one carbon atom can form four covalent bonds, allowing stable chains, branches and rings.
Its four outer-shell electrons can be shared with carbon, hydrogen, oxygen, nitrogen or sulfur. Changing the carbon skeleton or attached groups changes shape and chemical behaviour, so structure can produce different biological functions.
Glycogen and cellulose both contain glucose units, but their bonding arrangement gives glycogen a compact storage form and cellulose strong fibres.
Four bonds explain carbon's versatility; they do not make every carbon compound chemically identical. Always connect the particular structure to the claimed function.