The core is the only layer of the Sun where energy is produced because that is where the fusion process occurs between hydrogen and helium atoms.There, the hydrogen atoms being converted into helium molecules.
The core of the Sun is the region that extends from the center to about 20–25% of the solar radius. It is here, in the core, where energy is produced by hydrogen atoms (H) being converted into molecules of helium (He).