The problem of deriving a complete set of aerosol optical properties from Sun and sky radiance measurements is discussed. Algorithm development is focused on improving aerosol retrievals by means of including a detailed statistical optimization of the influence of noise in the inversion procedure. The methodological aspects of such an optimization are discussed in detail and revised according to both modern findings in inversion theory and practical experience in remote sensing. Accordingly, the proposed inversion algorithm is built on the principles of statistical estimation: the spectral radiances and various a priori constraints on aerosol characteristics are considered as multisource data that are known with predetermined accuracy. The inversion is designed as a search for the best fit of all input data by a theoretical model that takes into account the different levels of accuracy of the fitted data. The algorithm allows a choice of normal or lognormal noise assumptions. The multivariable fitting is implemented by a stable numerical procedure combining matrix inversion and univariant relaxation. The theoretical inversion scheme has been realized in the advanced algorithm retrieving aerosol size distribution together with complex refractive index from the spectral measurements of direct and diffuse radiation. The aerosol particles are modeled as homogeneous spheres. The atmospheric radiative transfer modeling is implemented with well-established publicly available radiative transfer codes. The retrieved refractive indices can be wavelength dependent; however, the extended smoothness constraints are applied to its spectral dependence (and indirectly through smoothness constraints on retrieved size distributions). The positive effects of statistical optimization on the retrieval results as well as the importance of applying a priori constraints are discussed in detail for the retrieval of both aerosol size distribution and complex refractive index. The developed algorithm is adapted for the retrieval of aerosol properties from measurements made by ground-based Sun-sky scanning radiometers used in the Aerosol Robotic Network (AERONET). The results of numerical tests together with examples of experimental data inversions are presented.