Really we don’t know.
We know only the frequency of the wave equals to that of energy difference divided by the plank’s constant.
If any charge vibrates with a particular frequency, electromagnetic wave is generated of that frequency. This is a fact.
Therefore, the electron, which is moving from higher energy level to lower energy level in atom, should vibrate with that frequency of the radiated electromagnetic wave.
But no one talks about it. Everyone is in a hurry to get ahead of each other. Or we conveniently avoid talking about difficult topics. But things are going wrong.