Question: how are electromagnetic waves produced what is the source of energy of these waves?
Answer: Electromagnetic waves are produced by accelerating charged particle. When the charge moves with acceleration, both the magnetic and electric fields change continuously. This change produces electromagnetic waves. Accelerated charge is the source of energy of these waves.