Are electromagnetic waves only caused by accelerating charges?

The classical electromagnetic waves as modeled by Maxwell's equations solutions, are one framework, the classical one.

Electrons and photons are elementary particles and are in the quantum mechanical framework.

The classical framework, emerges smoothly from the quantum framework at the overlap kinematic regions. One cannot use the same mathematics without critical thinking.

The electron does not absorb a photon. A free electron interacts with a photon according to quantum electrodynamic rules, and it is not a classical electrodynamics acceleration or deceleration. An electron bound to matter changes energy levels and the photon is absorbed or emitted from the atom/molecule/lattice. All these interactions are calculable with Feynman diagrams.

compt

For example these are the first order diagrams that contribute to the free electrom photon interaction that can be used to give the probability of interaction and statistical plots of energy and momentum.

How classical fields emerge from quantum is a story that needs the mathematics of quantum field theory.

The classical observation that accelerating charges create electromagnetic waves as well as changing magnetic fields may also do, is beautifully explained with the classical electrodynamics of Maxwell's equations.


There are a few ways to create photons:

  1. accelerating charges (like in your example), but based on the comments, you need to count accelerating magnetic dipoles too.

https://physics.stackexchange.com/a/65350/132371

  1. electron relaxation, that is when an excited electron as per QM at a higher energy level moves to a lower energy level, and the difference in energy is emitted as a photon

https://en.wikipedia.org/wiki/Electron_excitation

  1. molecules rotational, vibrational energies can be converted to photon emission.

https://en.wikipedia.org/wiki/Emission_spectrum

Emission can happen in two ways:

  1. spontaneous emission, when a QM system transitions from an excited state to a lower energy state and emits a photon

https://en.wikipedia.org/wiki/Spontaneous_emission

  1. stimulated emission, is when an incoming photon with specific energy can interact with an excited electron, causing it to drop to a lower energy level

https://en.wikipedia.org/wiki/Stimulated_emission

Now I understand you are confused because when an electron absorbs a photon, it moves to a higher energy level as per QM. This move is what you imagine as a classical move and acceleration. In reality, this electron does not accelerate, it just moves to a higher energy level as per QM. After this excitation, the electron will relax. This relaxation is when the electron moves back to a lower energy level, and emits a photon. Still, the electron does not accelerate as it moves to a lower energy level, as per QM. It is the difference in energy level (of the electron/atom) that is emitted as a photon. The electron does not accelerate as it moves between the energy levels as per QM, it just starts existing at a different energy level as per QM.