The Sun's electromagnetic radiation is produced by

-Gravitational forces in space
-Exchange of gases in space
-Stationary charges and solar winds
-Changing electric and magnetic fields ​