LEDs consist of pn-junctions, so why can blue LEDs be used for generating white light, but red LEDs cannot
"White" light consists of a mixture of at least three colors that should be blue(ish), green (ish) and red(dish).
The most common way to get white from basically monochromatic LED light is to use fluorescent material.
This is what a spectrum of a blue LED looks like:
This gets converted in the LED to something like this:
In fluorescent material, an electron is excited by a single incident photon and then relaxes over intermediate energy levels. This means that photons emitted during this relaxation can only be of lower energy (shifted to the red end of the spectrum) compared to the exciting photon.
So it's easily possible to get red from blue but not the other way round.
The blue led has wavelength of about 450nm and has more energy than red photons at about 600nm wavelength. To create white light phosphors were discovered a long time ago, phosphors are used in fluorescent bulbs (convert UV to blue, green, red) and in old CRT TVs that converted electrons into colours of light. The phosphor atom takes in a higher energy photon and then produces a lower energy photon ( color) and heat. There are many different phosphor chemicals (1000s to 10000s) that absorb UV or blue or other and make different colours of light.