The main component of the sun is hydrogen. The sun is mostly made up of hydrogen gas, which undergoes nuclear fusion in its core. During this process, hydrogen atoms combine to form helium, releasing a huge amount of energy in the form of light and heat. This energy powers the sun and provides light and warmth to our solar system.