WHY are electrons' energy levels quantized?

WHY are electrons' energy levels quantized?
The energy level of electrons has been proven to exist at a number of set levels. So far as I know this is simply a matter of the universe we find ourselves in. I am not sure that anubody knows, I think 'it just is'.
Hmm, I don't know how to put this simply, but I'll give it a go.
Electrons are quantum particles (exhibit wave/particle duality). Energy levels arise because wavefunctions (mathematical descriptors of quantum states) have to be singlevalued and continuous.
To give a massively simplified example of this, y = sin(x) is continuous (ie sin(x) = 0 at x = 0 and x = 2 pi, and you get the same repeating pattern if you translate it along the x axis by 2 pi) and single valued (there is only one value of sin(x) for each value of x).
y = sin(2x) is the same, continuous and single valued, as is y = sin(3x),  but, e.g., y = sin(2.3x) is not continuous. Therefore, only integer multiples of the form y = sin(nx) are allowed (continuous). Thus, if you like, the values of n are the 'energy levels'. It's like that in quantum mechanics, only there's a bit more to it.
« Radioactive decay  Question » 