Do the atoms within a material absorb the photons and re-emit them in the direction they came back
I assume that you're describing your model of reflection here, not absorption.
In the case of specular reflection, the photons just propagate according to Maxwell's equations. A high conductivity material or a boundary between materials with different index of refraction causes a boundary condition that causes the light wave to reflect. There's no absorption of the photons involved.
why is light absorbed by a material if it is not reflected?
It isn't necessarily. It could also be transmitted and continue to propagate through the new material. (This is how you can see things through a glass window)
but in the case that all of the light is absorbed, why is only some of it reflected?
If all the light is absorbed, then none is reflected.
This is conservation of energy.
What dictates whether light is absorbed or reflected?
Light is reflected if there is a difference in the index of refraction of the two materials, or if the second material is highly conductive (for example, metal).
Light is absorbed if it is propagating in a material and that material has some particles in it that are able to absorb light at that particular wavelength and be promoted into a higher energy state. Particles here could be electrons, but they could also be things like phonons (quantized lattice vibrations).
So if there's a light beam impinging on a surface, to be absorbed it should first not be (completely) reflected at the surface, and then it is absorbed as it begins to propagate into the material.