Why refractive index of media depends on the wavelength of light passes through it? What are the fundamental quantum mechanical reason that why light slow down in the denser media?
Your assumption is wrong. Photons have mass through the equations E = mc^2 and E = hv. Together they show that m = hv/c^2. Einstein used that equation in Einstein A (1911), "On the Influence of Gravitation on the Propagation of Light (In German) Ann. der Phys., Vol 35 pp 898 - 908 (English translations available). That also matches observation and photons@ transfer of momentum. The rest of the question has no meaning.
Question is still remain the same, that whether photon have mass or not? If you believe that they have no inertial mass then explain why charged lithium ion battery has higher mass than discharged?
The mass of a photon manifests itself in energy, impulse, moment and transverse inertia (a ray of light is a symbol of straightness).
The phenomenon of light refraction we usually consider from the point of view of geometrical optics. But photons are vortexes. Look at the picture please (figure from the book "Electromagnetic Gravity. Part 1" in my profile). Figure shows a diagram of the refraction of a beam of light at the interface between two media. Refraction also occurs due to the finite photon size.
In the diagram, photons pass from optically less dense medium A to optically denser medium B. The velocities of photons in these media are different. If the angle of incidence is not zero, then for some time one part of the photon still moves in medium A, and the other part of the photon moves already in medium B. At the same time, medium B “brakes” the photon, so that it rotates around the point braking. Small photons (purple) have time to turn faster than large photons (red).