Because deserts have such little water vapor in the air, it makes it harder to trap heat or cold in a desert. And at night, the sun no longer heats the desert and the heat from the day doesn't stay trapped. Because of this, some deserts can get extremely cold at night, dropping to temperatures below 40F.
Hope this helps!! Have a wonderful day!!