Electronic spectra of solids, impurities and superstructures with the recursion and renormalization methods