The sun is really hot and is full of hydrogen gas, density, and pressure. The sun is made up of 99.8% of the matter in the solar system. That mass then pulls everything together with gravitational force.
You have 2 positive hydrogen atoms. Usually 2 protons would repell each other but the amount of heat rams them together.
The 2 hydrogen atoms make a helium atom and when they collide, they release a little bit of mass and that mass then is energy. This process repeats multiple times every second creating a lot of energy which produces heat, then light.