Yes deserts do get cold at night.
In the daytime the desert temperatures can reach 100 F and sometimes higher depending on the desert and then at night the temperature of the desert can drop down to 25 F and sometimes lower also depending on the desert and location of the desert.
At night the Sahara desert can get as cold as 25 F which is below freezing.
During the daytime the daytime temperatures of the Sahara desert can get very hot as in 100 F and sometimes hotter but during the night the temperature of the Sahara desert drops and gets really cold.
So if you're living in the Sahara desert and it's 100 F out you can be sweating and wanting too cool down and then at night you'd need heat.
It would be very difficult to live in the Sahara desert without a house with heating and cooling because you would need heat during the night and air conditioning during the day when the temperature is hot.
Although 25 F is cold it's not too bad though if you have a house because in the United States in most places it can get below 25 F at night and during the day sometimes as well but if we have heat it's not much of an issue.