During the day, the temperature of the sand in a desert rises as the sand is heated by the sun. After the sun sets, the sand cools. What happens to the heat energy in the sand as it cools?

AIt is destroyed.
BIt is used by the sand to do work.
CIt goes back into the sun, completing the cycle.
DIt is transferred to the air via the process of radiation.