It is important to understand that in mainstream physics - in QM there is no quantization of energy per se - energy can have any value. The quantization of energy to energy to energy levels is a result of quantization of moment of inertia. It follows that energy is quantized only relative to given potential and mass. In classical QM (both Schrodinger and Dirac) potential is simply from classical electrodynamics. In quantum field theory the potential is treated as a material field, so as a result potential is somewhat quantized but only relative to space. And since space is not quantized, there is no "visible" quantization.

Let me outline how the energies are quantized in QM (for simplicity let focus on 1 particle problem in hydrogen like atom): First you get yourself a potential, say the classical "inverse square law":

(where K is potential constant say

and r is the distance from the source) plug it into the Schrodinger equation

and solve the eigenvalue problem. The result will be a set of energies (eigenvalues) and associated wavefunctions (eigenvectors). Solving the equation is far from trivial, but can be fully understood in several hours, anyway that's just mathematics. By doing this you can find out that the equation can be solved only for some negative energies, but all positive energies. And this is how the energies are quantized.