Why does friction produce heat?

They produce heat because the surfaces on small scales are rough like canyons rather than flat like the ocean. As these rough surfaces come into contact with each other they repel. When two atoms are brought very close together they store potential energy. When they move apart that energy becomes kinetic. However, this kinetic energy generally isn't enough to escape the object they are attached to so the energy becomes randomly distributed as kinetic energy exchanged between the atoms of the object also known as thermal energy. In some cases the energy is enough to break bonds and indeed friction can cause objects to deteriorate and fall apart as in a meteor falling through the sky being torn apart by atmospheric friction.

As for visible light, if you've ever seen a meteor shower then you know that they do produce a lot of visible light due to friction with the atmosphere.