All electromagnetic waves transfer energy. When this energy is absorbed by matter, it is converted into heat because it causes the particles in the matter to vibrate more rapidly.