An LED needs to be a diode, specifically because the way the charge carriers recombine in the forward-biased diode junction releases the correct amount of energy to create photons in the visible range.
The word 'releases' in the sentence throws me off, but I'm not sure if it's an error in the sentence or on my part.
How I would write it:
An LED needs to be a diode, specifically because of the way the charge carriers, recombined in the forward-biased diode junction, release the correct amount of energy to create photons in the visible range.