Your question is quite complex for me, but you can found answers about it in Richard P. Feyman's book "Quantum electrodynamics". (Advanced book classics collection).
As far as I know (for this book), if the photon is far away from the resonance frequency the material will be transparent for it.
When the frequency is in the band gap energy, atoms can absorb the photon raising the energy level of its electrons but it can also happen a double transition where the atom changes from an initial state L to another higher energy state M and then to a lower state N. In this case the incoming photon has been scattered by the atom (it has been absorbed and re-emitted with another direction and energy). It's also possible to make a L --> M --> L transition in which the incoming and outgoing photons will have the same energy.
All these things and more (and much better) are explained on the book mentioned above.