Yes, the sun is constantly radiating energy. It is a giant ball of hot gas that is constantly undergoing nuclear fusion, which is the process of combining hydrogen atoms to form helium. This process releases a tremendous amount of energy, which is radiated away from the sun in the form of electromagnetic waves.
Electromagnetic waves are produced on the surface of the sun when charged particles, such as electrons, are accelerated. This can happen in a variety of ways, including:
Thermal motion: The sun is very hot, and this causes the particles in its atmosphere to move very quickly. When these particles collide with each other, they can be accelerated and produce electromagnetic waves.
Magnetic fields: The sun has a very strong magnetic field, and this field can also accelerate charged particles. When these particles are accelerated, they can produce electromagnetic waves.
Solar flares: Solar flares are sudden explosions of energy on the surface of the sun. These explosions can release an enormous amount of energy, and they can also produce a lot of electromagnetic waves.
The type of electromagnetic wave that is produced depends on the energy of the charged particle that was accelerated. Lower-energy particles produce longer-wavelength waves, such as radio waves and microwaves. Higher-energy particles produce shorter-wavelength waves, such as ultraviolet light, visible light, and X-rays.
The sun's radiation is essential for life on Earth. It provides the energy that plants need to photosynthesize, and it also warms the Earth's atmosphere. Without the sun's radiation, Earth would be a much colder and less hospitable place.
Most of the emission that we observe originates quite deeply from the surface, there were estimates that typical photon will diffuse about 170 thousand years to come out of the Sun (one should also note that surface of the Sun is not well defined), it's about 250 miles thick.
Emission of radiation needs acceleration of charges to be happening, typical mechanism in hot ionized gas would be collision of electrons with atoms.
Solar energy is constantly flowing away from the sun and throughout the solar system. Solar energy warms Earth, causes wind and weather, and sustains plant and animal life. The energy, heat, and light from the sun flow away in the form of electromagnetic radiation (EMR). The sun continuously radiates energy into space in all directions. Some of the sun's energy is intercepted by the Earth. The average temperature of the surface of the Earth remains a little above 300 k. All of the energy from the Sun that reaches the Earth arrives as solar radiation, part of a large collection of energy called the electromagnetic radiation spectrum. Solar radiation includes visible light, ultraviolet light, infrared, radio waves, X-rays, and gamma rays. Radiation is one way to transfer heat. Energy is continuously created in the sun due to nuclear fusion. Nuclear fusion is a nuclear reaction in which two or more atomic nuclei join together or fuse to form a single heavier nucleus. During fusion, a large amount of energy is released. All of the energy from the Sun that reaches the Earth arrives as solar radiation, part of a large collection of energy called the electromagnetic radiation spectrum. Solar radiation includes visible light, ultraviolet light, infrared, radio waves, X-rays, and gamma rays. The power output or luminosity of the Sun is 3.8 x 1026 W, this is the total amount of energy released from the Sun every second. The Sun's energy is radiated outwards in all directions; consequently the Earth receives only a small fraction of this energy. The Sun is made of plasma, which is a gas of bare ions and electrons. The energy released from nuclear fusion heats this plasma, and the moving charges emit electromagnetic waves. Most of the solar radiation is absorbed by the atmosphere, and much of what reaches the Earth's surface is radiated back into the atmosphere to become heat energy. Dark colored objects, such as asphalt, absorb radiant energy faster than light colored objects. Einstein's famous formula (E = mc2 or Energy = mass × the speed of light squared) explains why energy is released. This energy eventually makes its way to the outer regions of the sun and is radiated or emitted away in the form of energy, known as electromagnetic radiation. The electromagnetic wave emitted from the sun that produces heat is the infrared light. Greenhouse gases suspended on the atmosphere allows further absorption of heat by reducing the outbound infrared light. The range of electromagnetic energy emitted by the sun is known as the solar spectrum, and lies mainly in three regions: ultraviolet, visible, and infrared. The solar spectrum extends from about 0.29 µm (or 290 nm) in the longer wavelengths of the ultraviolet region, to over 3.2 µm (3,200 nm) in the far infrared.