We report a study of the nanoscale mass-density fluctuations of heterogeneous optical dielectric media, including nanomaterials and biological cells, by quantifying their nanoscale light-localization properties. Transmission electron microscope images of the media are used to construct corresponding effective disordered optical lattices. Light-localization properties are studied by the statistical analysis of the inverse participation ratio (IPR) of the localized eigenfunctions of these optical lattices at the nanoscale. We validated IPR analysis using nanomaterials as models of disordered systems fabricated from dielectric nanoparticles. As an example, we then applied such analysis to distinguish between cells with different degrees of aggressive malignancy.