Carbon's unique ability to form stable bonds with many other elements, including itself, allows for the creation of an immense variety of complex molecular structures. These diverse structures interact with light in different ways, resulting in a wide range of colors.