We present a theory of scanning local optical spectroscopy in quantum structures taking into account structural disorder. The calculated spatially resolved spectra show the individual spectral lines from the exciton states localized by the disordered potential as well as the quasicontinua spectra at positions close to the potential barriers in agreement with the experimental findings