The Sun’s primary energy source is nuclear fusion, which occurs when hydrogen atoms join to make helium, releasing enormous amounts of energy in the form of light and heat.
In the core of the Sun, temperatures and pressures are so high that hydrogen nuclei are able to overcome their mutual electrostatic repulsion and fuse together to form helium nuclei. This process, known as hydrogen fusion or proton-proton chain reaction.