Visible light from the sun, or incandescent lights, is also emitted due to heat. Planck’s law is the mathematical relation if you want to know more.