Quantum mechanics teaches us nature isn't continuous though.
But as far as I understand that is just the result of constraints imposed by the atom/molecule "box". Like how a guitar string can only vibrate at certain frequencies because an integer multiple of wavelengths of the standing wave must fit on the string.
Outside of such systems, energy levels are not quantized. For example, photons from distant galaxies appear to be redshifted on a continuous spectrum.