We suggest a method for calculating electronic spectra in ordered and disordered semiconductor structures (superlattices) forming double quantum wells (QW). In our method, we represent the solution of Schr\"odinger equation for QW potential with the help of the solution of the corresponding diffusion equation. This is because the diffusion is the mechanism, which is primarily responsible for amorphization (disordering) of the QW structure, leading to so-called interface mixing. We show that the electron spectrum in such a structure depends on the shape of the quantum well, which, in turn, corresponds to an ordered or disordered structure. Namely, in a disordered substance, QW typically has smooth edges, while in ordered one it has an abrupt, rectangular shape. The present results are relevant for the heterostructures like GaAs/AlGaAs, GaN/AlGaN, HgCdTe/CdTe, ZnSe/ZnMnSe, Si/SiGe, etc., which may be used in high-end electronics, flexible electronics, spintronics, optoelectronics, and energy harvesting applications.