An explanation of how most physics texts get the explanation of photon emission deliberately wrong
Light from a flame comes to us because of an energy transformation. Macroscopically we say the chemical energy in the wax is released as heat and light. But at the level of single particles we speak about photons and electron orbitals. Wax is made largely of carbon atoms and those carbon atoms have electrons which can move closer or further away from the centers of the atoms. Electrons moving from one place to another produce particles of light (photons). But why should this happen? Why should light be created just because electrons move?
First, let's take a longish diversion and consider an analogous case: why does the sky diver fall towards the Earth? Well, the Earth generates gravity due to its mass and so when the sky diver first gets into the airplane, the engines have to do a lot of work to get him from the ground to up high in the sky. The energy to lift the sky diver comes from the engines and the engines get their energy from the chemical energy in the fuel. But where does all that energy go? Well the law of conservation of energy (or to be fancy: the first law of thermodynamics) says that you cannot create or destroy energy - only change it from one form into another. So the work done by the engines of the plane eventually goes into gravitational potential energy (as well as some sound and lots of heat that the engines make). Gravitational potential energy is a way of talking about the energy that a sky diver gains because he has gained height. We might not notice this potential energy initially - but it becomes pretty obvious when he jumps out of the plane. Then he starts accelerating towards the ground. That is: he gains kinetic energy (energy of movement). Now where did that kinetic energy come from? Plainly it did not just get created out of nothing. It came from the gravitational potential energy gained on the way up.
The higher you get - the further from the center of the Earth you go - then the greater your gain of potential energy. But here's a strange thing - if you were an infinite distance away from the Earth, then the force of gravity on you due to the Earth would fall to zero. If there is zero force on you due to the Earth then it's convenient to say that the gravitational potential energy that you have due to the Earth must be zero too. So at an infinite distance (height) from the Earth you've got zero potential energy due to the Earth. But go any closer, to where there actually is a non-zero force on you due to the Earth and you lose potential energy (because you have lost height). If you lose potential energy as you get closer - but you were originally at zero - then you must have fallen from zero to something even smaller. Namely - a negative number. And this is why potential energies like gravity are negative. It's just an accounting trick used by physicists. Actually the formula looks like this:
There, E (with a little subscript G (for gravity)) is the energy, big M is for the mass of one of the things (like the Earth) and little m is for the mass of the other thing (like a sky diver) and r is the distance between them. Notice the negative sign out the front. Because r is the denominator then if it gets bigger and bigger then E gets closer and closer to zero (this actually means it gets less and less negative) - so it's increasing.
This can be confusing. So don't worry if you don't get it first time around.
The point here is that we can calculate the amount of energy precisely so long as we know the masses and distances involved. And that equation above coupled with another one for kinetic energy (which is "E = 1/2mv^2") can tell us what the maximum possible velocity is for an object that falls from height h.
What does any of this have to do with why a candle shines?
Electrons exist around centers (nuclei) of atoms and can be more or less close to the nucleus. The nucleus is positively charged because of the protons there. The electrons are negative. Positive attracts negative so electrons are kind of like the sky diver I was describing. They have more or less potential energy depending on how far they are from the center of the atom. But this time rather than gravity pulling the electrons in, it's an electrostatic force (although there is gravity too it's much much weaker because protons and electrons have only a tiny mass). Take an electron far from its nucleus and it has more electrostatic potential energy than if it was closer (take it really far away and it has zero because there's no longer a force of attraction at all and so this means, once more, that non-zero potential energies must be negative). Remember: when a skydiver gets closer to the Earth after jumping out of a plane, he gains kinetic energy (he moves faster). This gain in kinetic energy comes at the expense of gravitational potential energy.
So if an electron gets closer to a nucleus, it loses potential energy and that potential energy has to be converted into something. Now some interesting physics starts to happen: when electrons get closer to a nucleus they don't lose electrostatic potential energy at the expense of kinetic energy. (A tiny amount of gravitational potential energy is converted into a tiny amount of kinetic energy though). They lose their electrostatic energy at the expense of light energy. The amount of energy lost by an electron as it transitions from one distance around a nucleus to another is very closely matched by the amount of energy that the particle of light (a photon) has.
Now if you were to read standard text books or popular science books on this topic, you typically encounter really bad explanations about what is going on. Things like: the electron does not move from one place to another. The texts say something like - all the energy the electron loses as it transitions from one place around the nucleus to another is given entirely to a photon (leaving no energy for movement). And because movement from one place to another means a change in kinetic energy, and there's no energy left for kinetic energy so it cannot move. The standard way of explaining this is to say: all of the energy lost by an electron in transitioning from a high orbital to a lower orbital is given to the photon emitted and the electron "quantum jumps" between one energy level and another without ever passing through the space in between. They say the space in between is prohibited or restricted. It's as if to say a sky diver leaps from a plane only to instantly appear on the ground without falling through the air in between.
But that is the standard explanation with respect to electrons. I've never seen a text that doesn't say something like that. Most of the time the error comes to us, in my opinion, because of this picture - a version of which is in just about every text on introductory quantum physics (this one is taken straight from the Wikipedia article on atomic orbitals):
That's a great picture - at a glance it shows how photons are emitted. The green dot (the electron) goes from one orbital to another, losing energy which appears as a photon. The problem is it also allows people explaining this stuff to introduce a misconception when they tell the story. It should be important to emphasize that the orbitals are not perfect circles and more importantly they are not narrow little tracks. But because of this picture (or ones like it), physics professors and teachers - parroting what they were told and what they have read, find it easier to say the green dot (the electron) does not pass through the space in between. It "quantum jumps" in a discontinuous way from one orbital to another and this is why you always get a single photon of the same wavelength. But you don't. And if you start with a bad misconception (like that picture) it's harder to explain reality in a way that makes sense. You are more likely to try to explain the picture than the reality it represents. But the picture is not the best representation of reality we have.
Here's a video at "Physics World" that attempts to explain emission stuff using quantum jumps with an even simpler diagram - again the type you find in many standard texts. Physics World is a publication of the Institute of Physics. So they should know better - and the physicist Danny Segal in the video who is doing the actual explaining is an expert in exactly this area (quantum optics) should know better too. In fact, it's of course the case he does - but my guess is that he thinks this way of explaining photon emission is good for most purposes, even if it does contain some misconceptions. The whole story, he probably thinks, is too hard to get across in a short video. It's obvious you can get away with bad explanations and still do lots of useful things (like create technology). By analogy - we know that Newton's law of gravity is strictly, false. The explanation that there exists a force like the one Newton described is a bad explanation (the true explanation is Einstein's General theory of Relativity by the way - I've written an article on the misconception that gravity is a force here). But Newton's explanation is good enough to get rockets to the moon (although woefully inadequate if you try to do something like set up a GPS satellite system).
It is useful to watch explanations like those in the video with Professor Segal because it shows how misconceptions in science spread. Right at the very start the explanation begins by using the Bohr model of the atom (which is what is pictured above). But we know that the Bohr model is false (and all physics teachers and professors like Prof. Segal definitely know this too!). The Bohr model starts with the assumption that electrons exist in orbitals with single well defined energies. But they do not. The orbitals are spread out in space like a cloud. This solves the problem entirely of how electrons "jump". They don't. Because they don't need to. The orbitals can and do overlap. So electrons really do gradually move through space from one orbital to another. It's just that this "gradually" happens very, very quickly (although not instantly as many explanations say - that would violate special relativity by the way). If you look up popular/high school/lower undergraduate explanations of electron transitions, it is often given in terms of the Bohr model. But if you look up electron orbitals, then you get better explanations in terms of the more accurate cloud picture - not the Bohr model.
Spherical orbitals that electrons can be in can better be pictured like this:
But even this is not perfect (of course nothing can be). The orbitals can actually overlap as I said. In time the orbitals themselves move. All the picture above shows is where the electrons in those orbitals are 90% of the time. But there is always a non-zero chance the electron can be anywhere. And that's how transitions can happen gradually. Anyway, it would be better if texts combined this picture with the one above to explain how photon emission happens without using the nonsense of quantum jumps. Or in the future, as is happening now, texts will incorporate movies showing how orbitals are not fixed. The fact - for those who've studied a little chemistry - if an electron is "constrained" to the 1s orbital around a hydrogen atom - that 1s orbital has a spherical shape and pictures show where the electron is 99% of the time. So it pictures the atom as a sphere. But that sphere in reality stretches off to infinity overlapping with all the other orbitals. And this is how the electron in 1s can move to any other orbital without quantum jumping. It doesn't need to - because there is always a non-zero probability that it could be in another orbital. That's precisely what quantum physics allows and classical physics does not.
Here's a full 50 minute chemistry lecture explaining how orbitals overlap between atoms to explain bonding. Strictly this is a different sort of process - but it emphasizes the point that the Bohr model is false - it introduces the idea of dynamic orbitals and if only the physics lecture people could do the same we wouldn't have these misconceptions about quantum jumps. Which are an unnecessarily bad way of explaining what is a false theory anyway. I don't know why it is - but chemistry texts typically do a better job of explaining this stuff than physics texts. Most of the best resources on the web on atomic orbitals are found in the chemistry schools of the best universities. Most of the misconceptions are found among the physics schools of same.
Here's another video claiming to show video of the electron around an atom - what I want to highlight here is how the thing is moving about.
The idea of instantaneous quantum jumps is the kind of silly talk that helps open the door to pseudo-scientific garbage when it comes to quantum physics. It's true that quantum physics says some strange things but this doesn't mean that in general strange things can be reduced to quantum physics. Often strange things are just plain mistakes - or lies.
So in summary: while it's true that the candle glows because photons are emitted as electrons lose energy transitioning between energy levels (orbitals) around atoms, the orbitals are diffuse regions - not strictly defined as described in the Bohr model like tracks around an athletics oval. The electron really does gradually move through spacetime as it transitions from one orbital to another and in the process a photon is emitted so that energy is conserved. The 'weirdness' is that the orbital is spread out in space because the electron is also spread out in space and time - like an ink-blot that spreads out on paper.
The energy of a photon depends on its wavelength. The wavelength determines the colour. Now right at the top of this article is a picture of emission spectra: the pattern of light you get when electrons move down energy levels. Each line corresponds to a particular transition. Notice how narrow - how sharply defined - those lines are. They are narrow but they do have width - but most importantly they represent the difference between two orbitals. Not the energy of the orbitals themselves (which are broad).
The average difference between two orbitals is always going to be very narrowly defined because on average the difference will always be the same even if the orbitals are spread out like clouds. I emphasize on average because deviations from the average (along with some other effects) give the spectral line its width.
If you want to know more, then read The Beginning of Infinity by David Deutsch (specifically chapter 11 "The Multiverse") or just go here where he explains why the very idea quantum jumps are misconceptions.
But it's not only David Deutsch, because Schrodinger himself weighed in on this writing: "I believe one is allowed to regard microscopic interaction as a continuous phenomenon without losing either the precious results of Planck and Einstein on the equilibrium of (macroscopic) energy between radiation and matter, or any other understanding of phenomena that the parcel-theory affords."
In other words: the results of Plank and Einstein (that electrons really are particles (parcels)) is not affected at all by taking on the idea that transitions between energy levels happen continuously. Just like the sky diver who falls continuously from the plane to the ground.
To be precise the reason why any of this happens is because electrons, like photons and all particles, are multiversal objects. Across the multiverse an electron can spread out - and in this sense is a wave in the higher dimensional space in which individual universes exist. However instances of the electron in the time and space of a single universe are most definitely particles. You can read more about that here.