Well energy absorption by a material depends upon their atomic properties. Energy is absorbed in discrete quanta of energy as predicted by quantum mechanics only if the corresponding energy state is available either it is absorbed by electrons or nucleus depends whether it can go to permissible energy state, if not system can't absorb energy at all.