How do materials absorb light I'm curious how light is absorbed in materials.  From what I understand, when an electron absorbs a photon, it gets excited to an energy level that is higher than the level it's in and the energy difference between the levels is equal to the energy of the photon.  Then the electron spontaneously falls back to its ground state, releasing a photon with the same amount of energy. 
So in that scenario, the photon is essentially scattered by the electron.  What happens when a material absorbs energy such that, for instance, UV light strikes a material and infrared light gets emitted from it.  What is happening between the photons and the material in that case?
To be clear, I'm curious what happens when light is completely absorbed by the material and what determines if it gets absorbed vs. simply scattered as described in my first paragraph.
 A: When a photon interacts with an atom, three things can happen:


*

*elastic scattering, the photon keeps its energy level and changes angle

*inelastic scattering, the photon keeps part of its energy and changes angle

*absorption, the photon gives all its energy to the absorbing atom, and the photon ceases to exist
A mirror is 1., elastic scattering, reflection.
Now you are describing in both cases 3., absorption. The difference between the two cases is that in the first case you describe absorption, where the photon gives all its energy to the absorbing atom/electron and ceases to exist. Then, the electron relaxes in a single step and emits a photon with the same energy as the absorbed photon.
In the second case, the photon gets absorbed (UV light), the photon ceases to exist, gives all its energy to the absorbing atom/electron, and then the electron relaxes in single or multiple steps, maybe with a delay, but the emitted photon has different energy than the originally absorbed photon (IR light).
There are different ways an electron (atom) can relax, like in a single step. Still, the emitted photon might have a different energy level than the originally absorbed one. Especially when the relaxation happens in multiple steps, the emitted photons all have different energies than the original photon.
These are all examples of luminescence, which is spontaneous emission of light by a substance not resulting from heat. 
Photoluminescence is light emission after photon absorption. It is initiated by photoexcitation (as in your case).
Now it is very important to understand that not only the number of steps of relaxation can vary, but the delay between absorption and emission too.
It can go up to milliseconds in the case of phosphorescence.


Phosphorescence is a type of photoluminescence related to fluorescence. Unlike fluorescence, a phosphorescent material does not immediately re-emit the radiation it absorbs. The slower time scales of the re-emission are associated with "forbidden" energy state transitions in quantum mechanics. As these transitions occur very slowly in certain materials, absorbed radiation is re-emitted at a lower intensity for up to several hours after the original excitation.


https://en.wikipedia.org/wiki/Phosphorescence

In the case of phosphorescence, the electron undergoes an intersystem crossing, usually a triplet state. This takes time, and the electron will relax in a longer period of time.
A: 
I'm curious what happens when light is completely absorbed by the material and what determines if it gets absorbed vs. simply scattered as described in my first paragraph.

It depends on your definition of material. For solids, the quantum mechanical effects, i.e. energy levels that can absorb the photon, are not only on atoms. Solids are made up also by molecules and by lattices. These groupings have binding energies and the corresponding possibility of absorbing a photon and emitting a different one, distributing  the energy to  levels in the molecules and the lattice.
So a lot can happen when a photon hits a solid material, starting with the description in the answer by  Árpád Szendrei , of atomic interactions, to interacting with the total lattice. See the band theory of solids to understand the complexity.
The energy of the photon will contribute to the raising of the temperature of the material and thus go towards its black body radiation.
If the material is liquid, again there are bound quantum mechanical states on which the photon can be absorbed and the energy degraded with subsequent de-excitations. It is more time and space dependent than in solids.
Gasses are closest to atomic reactions since their complexity is only molecular in adding  extra energy levels for transitions.
