Broadly, the release of heat is primarily due to conversion of chemical potential energy into kinetic energy. Isolated atoms have high potential energy, and when they react, they form a new complex with lower potential energy. That loss of potential energy is converted mostly into kinetic energy in the form of heat. Strictly speaking, entropy is involved in the change in thermodynamic potential (Gibbs energy), so we can't just think in terms of heat production/loss. I'm not sure why conversion of mass to energy got brought into this - for chemical processes, it is fair to assume that mass is conserved and energy only changes forms.
The yellow light is due to what is called the sodium D-line. The reaction between sodium and chlorine is so exothermic that it produces some electronically excited sodium atoms, which quickly relax (dump their excess energy) by emitting light. Due to selection rules, the light energy has to match the energy gap between atomic orbitals of sodium. Sodium has two main transitions that are closely spaced at around 589 nm, collectively called the sodium D line. We perceive light of this wavelength as bright yellow. It is the same reason that sodium gives a yellowish color in a flame test, it is responsible for the yellow color of yellow fireworks, and it is why a cucumber pickled in brine will glow bright yellow if you run a current through it. Note that different elements give rise to different color - the yellow is unique to sodium.