How exactly does an electron falling back to its original state from an excited state produce electromagnetic waves?

This is really a classical question about a non-classical process.

In regular quantum mechanics, an electron doesn't need to move physically to change states, since for some $x$, $\psi_i(x)$ and $\psi_f(x)$ can both be non-zero, so if you say the electron is at $x$, it can be in any either $\psi$. In fact, that's generally how QM is calculated under a change of potential: you just project the old state onto the new states without any change of $\psi(x)$.

In our best description of these things, quantum electrodynamics, there is an initial state (excited atom) and final state (atom in the groundstate + a photon). What happens in-between is: everything, but that is not tractable, so we take approximations.

If you look at the 1st order term in the interaction that causes the atom to relax, you see 3 things: a photon creation operator, an electron destruction operator and an electron creation operator.

So, according to that, the electron doesn't fall, nor does it jump. It is destroyed, and a "new" electron is created in the ground state, along with a proper photon.

I put "new" in quotes because no electron has an identity versus any other electron.

In the absorbing case, the incoming photon is annihilated by the appropriate operator.

Both in Chemistry and Physics class, I have been told that when the right amount of energy is given to an atom,

A photon is an elementary point particle in the standard model of particle physics. It has to be the right energy photon, where $E=hν$ where $h$ is the Planck constant an $ν$ is the frequency of the classical electromagnetic wave that would emerge from millions of such photons. To see experimental evidence of the difference between photons, which are quantum mechanical point particles, and light see this answer of mine.

its valence electrons absorb the energy and jump into a higher energy level.

This is not what happens. The whole atom absorbs the energy with the result to find the electron at the higher energy state.

When it comes back down, it has to lose its energy,

Means that the atom deexcites, and the lower energy level is occupied by the electron.

and emits it in the form of electromagnetic waves,

This is wrong. A single atom does not emit electromagnetic waves. It emits one photon. You should know that in matter there are of order $10^{23}$ atoms in a mole. Light, classical electromagnetic waves, emerge from a confluence of the zillions of photons from bulk matter. This can be shown mathematically using field theory, but in the link I gave you there are experiments showing how the light behavior comes out of superposition of individual photons.

which may or may not be in the visible range.

This is correct.

But why for the case of falling electrons?

The electrons do not rise or fall. Atoms are described by quantum mechanical equations which give solutions in terms of probability . When the photon energy is in the difference between two atomic energy levels, the atom absorbs the energy and the electron is at a higher energy level, not in an orbit, but an orbital, a probability locus.

When the atom goes back to the lower energy level, there is a calculable time in QM for this to happen, a photon is emitted, as described above. See how the energy levels of the hydrogen atom are.

My only possible theory is that electromagnetic waves are produced when charged particles move, but then EMs should be emitted when it jumps to a higher level.

The first quantum mechanical model , the Bohr model of the atom, considered such a semi classical scheme . To make a planet like model for the hydrogen atom, for example , would be very unstable, the electron as it is attracted to the proton would fall down emitting continuous radiation (as you say) and no hydrogen atom would exist.

The data of hydrogen light though showed very specific spectral lines, that could mathematically be fitted with known series. So Bohr introduced the hypothesis that angular momentum was quantized so only certain stable energy levels existed. This was expanded with Schrodinger's equation and Quantum Mechanics theory was born.

To answer the title , one excited atom does not produce an electromagnetic wave, but a single photon. Electromagneitc waves are emergent from zillions of photons.

This is a nice question and has a rather illuminating answer.

Let's start simply, if I may, by considering 1 dimension rather than 3 and an infinite square well potential rather than the $1/r$ Coulomb field. If the well goes from $-a/2$ to $+a/2$ then it has solutions $\psi_n(x)=\sqrt{2 \over a} \cos{n \pi x\over a}$ when $n$ is an odd positive integer and $\psi_n(x)=\sqrt{2 \over a} \sin{n \pi x\over a}$ when $n$ is an even positive integer, and these have energies $E_n={\hbar^2 n^2 \pi^2 \over 2 m a^2}$ and the full wavefunctions including the time dependence are $\Psi_n(x,t)=\psi_n(x)e^{-iE_n t /\hbar}$. Standard stuff.

Notice - it's trivial but important - that the mean position of the electron $\langle x \rangle =\int {\Psi_n}^*(x,t) x \Psi_n(x,t) dx$ is zero for all $n$, as $x$ is odd and $\psi(x)^2$ is even .

Now consider an electron which starts in an excited state, say state 2, and decays to a lower state, say state 1, the ground state. Initially it is in $\Psi_2(x,t)$ and finally in $\Psi_1(x,t)$. In the middle it is in some superposition of the two. $\Psi(x,t)=A\Psi_1(x,t)+B\Psi_2(x,t)$. The energy during this (short) intermediate period is not defined but that's OK because of the uncertainty principle. $A$ and $B$ are functions of time and normalised to one, but these details don't concern us right now.

Now $\langle x\rangle$ is $\int \Psi^*(x,t) x \Psi(x,t) dx$ which is $\int (A{\Psi_1}^*(x,t)+B{\Psi_2}^*(x,t)) x (A{\Psi_1}(x,t)+B{\Psi_2}(x,t)) dx$

This contains terms $|A^2||\psi_1^2|x$ and $|B^2||\psi_2^2|x$ which vanish as before, but it also contains a couple of cross terms

$[AB {\Psi_1}^*(x,t){\Psi_2}(x,t)+ AB {\Psi_1}(x,t){\Psi_2}^*(x,t)]x$

Putting in the expressions for $\Psi_1$ and $\Psi_2$ turns this into

${2 AB\over a}[e^{i(E_2-E_1)t/\hbar} + e^{-i(E_2-E_1)t/\hbar}]x \cos{\pi x \over a} \sin{2 \pi x \over a}$

The space integral does not vanish, as it is the product of an even function and two odd functions. The time dependence looks like $\cos(E_2-E_1)t/\hbar$.

Now remember that the electron has a charge. What the maths tells us is that during the transition there is a dipole moment which oscillates with frequency $\omega = (E_2-E_1)/\hbar$, i.e.$f = (E_2-E_1)/h$. It is behaving as a little dipole radiator oscillating at just the right frequency to emit the EM radiation corresponding to the energy transition (i.e. the photon)

Notice that we pick up for free the selection rule that such transitions can only occur between odd and even states. In 3D such rules are more complicated but are basically just saying that the integral of the product of the space parts of the two states involved must not vanish.