Wavelength of light is an obvious factor, but this is not my point of question
Some specific questions are
What can be molecular/atomic level mechanism behind temperature and density dependence of refractive index?
refractive index is square root of product of relative (electric) permittivity and relative (magnetic) permeability of a medium. How a ceramic/glass/polymer structure can attain high relative permittivity (higher dielectric constant means more polar groups in polymers, more charge imbalance in ceramics) and high relative permeability (aromatic groups and ferromagnetic ligand centers in polymers, second one also for ceramics) without losing transparency?
how phase angle of complex permittivity and permeability of a medium depends upon its structure (e.g. factors mentioned above, bulk of chain and steric effect in polymers, photon propagation and phonon-mediated dipole oscillation of ceramics, chemical substitutions in ceramic structure)?
Why some atoms elevate refractive index of ceramics and some substituent groups elevate refractive index of polymers more than others? While atomic/ionic polarizability can be explained from fajan's rule and pearson's HSAB theory, and magnetic behaviors can be explained from magnetic spin, electronic configuration (and spin exchange between nearby atoms); have there been any comprehensive work combining all these aspects to predict refractive index elevation?
Density is a major consideration as you mention. Read the text H A Lorentz The Theory of Electrons for more theoretical linkages. I mention this reference in the second of 3 webinars dealing with optical properties (slide @ 38:00 minutes) Registration required:
Laser Diffraction Masterclass 2: How Can Material Optical Properties be Calculated/Estimated
Another excellent reference is Howard Jaffe 'Crystal Chemistry and Refractivity' - now in an inexpensive and improved Dover edition. See: https://tinyurl.com/y3rszxgc
Ritzhaupt‐Kleissl, Eberhard, Johannes Böhm, Jürgen Haußelt, and Thomas Hanemann. "Process chain for tailoring the refractive index of thermoplastic optical materials using ceramic nanoparticles." Advanced Engineering Materials 7, no. 6 (2005): 540-545.
Prabhakar, Roopa Lakshmi. Characterisation of novel degradable polymers and polymeric systems. University of London, University College London (United Kingdom), 2007.