The localization of light known as Anderson localization is a common phenomenon characterizing aggregates of metallic nanostructures. The electromagnetic energy of visible light can be localized inside nanostructures below the diffraction limit by converting the optical modes into nonradiative surface plasmon resonances. The energy of the confined photons is correlated to the size and shape of the nanostructured system. In this work, we studied the photoluminescence dependence of aggregates of 14 nm diameter gold nanoparticles (AuNPs) synthesized by drop-casting a liquid suspension on two different substrates of glass and quartz. The AuNP aggregates were characterized by electron microscopy, X-ray diffraction and X-ray photoelectron spectroscopy. The dielectric constant of the surrounding medium plays a crucial role in determining the aggregate geometry, which affects the Anderson localization of light in the aggregates and hence causes a red-shift in the plasmonic resonance and in the photoluminescence emission. The geometry of the gold nanoparticle aggregates determine the strength of the Anderson localization, and hence, the light emission from the aggregates. The photoluminescence lifetime was found to be dependent on the AuNP aggregate geometry and the dielectric constant of the medium.