 The production of energy at the core is the reason stars shine so brightly : every time two or more atomic nuclei fuse together to form a single atomic nucleus of a new heavier element , gamma ray photons are released from the nuclear fusion product . This energy is converted to other forms of electromagnetic energy of lower frequency , such as visible light , by the time it reaches the star 's outer layers . 
