Brehmsstrahlung radiation query - If an electron is constantly being decelerated, how does it emit a photon with a fixed energy? According to my textbook they simply say an electron is decelerated by a nuclei and this means it loses KE. The difference in KE is given off as a photon. But an electron is always being pulled back to the nuclei and hence decelerated when it is leaving the nuclei. So how do we find the difference in KE? Also at what point in its trajectory will the electron give off the photon? When it is closest to the nuclei? 
Edit:
This question is not talking about electrons in orbiting a nuclei, rather electrons passing around a nuclei and the radiation they emit. 
 A: Electrons, photons and nuclei belong to the quantum mechanical regime.
Electrons bound to nuclei are not in an orbit or trajectory, but in orbitals , at a fixed energy level. Orbitals are probability loci, where an electron may be found if measured .
Brehmsstrahlung is radiation emitted by decelerating  electrons in electric fields , which, if the electron has high enough energy, can be the positive electric field around a nucleus.
 
There is a distribution in the energy of the emitted photons, 
As the  interaction is at the quantum mechanical level, the energy distributions give the probability of an electron of a given energy to emit a photon of a given energy.

Also at what point in its trajectory will the electron give off the photon? When it is closest to the nuclei?

There will be an equivalent calculation in space which will give the probability of the electron as it impinges on the field of the nucleus to give off a photon at a given (x,y,z), although considering the  distances involved it will not be a very useful probability curve.
A: Incorrect assumption?  Brehmsstrahlung produces more of a continuum than a specific energy. You are correct in recognizing this assumption makes no sense. 
There is a "cutoff" energy equal to the original KE.  And in fact the spectrum has a peak, but it is not a sharp peak. 
The change in energy of any single electron can be found from the energy of the photon emitted.   But it will be a spectrum.  
"But an electron is always being pulled back to the nuclei and hence decelerated when it is leaving the nuclei".  In a classical view this is correct, and it also accelerates on the way in.  But it happens that electrons does not emits a continuous stream of tiny energy photons for reason that you should find another text book to explain. And which is very interesting. 
A: Brehmsstrahlung is not about emitting of a single photon, but about emitting many photons. You must be aware of so called soft photons that ere emitted for sure and in numbers - the corresponding probability is equal to unity and this emission can be calculated withing Classical Electrodynamics. The "hard" photons have small probability to be emitted and QED gives this probability. The hard photon energy is not obligatorily the same, but differs from one experiment to another, so an electron beam (many electrons encounter many nuclei) gives a spectrum of hard photons. Their emission is a spontaneous process and it is not attached to a certain point in space.
