Snakes survive in the desert due to adaptations in their behavior and their physiology. Snakes use their environment to regulate their body temperature. They have also adapted to survive off of the desert resources available to them.
According to DesertMuseum.org, snakes are cold-blooded reptiles that utilize their environment for thermoregulation by becoming active at optimal times. This allows them to avoid extreme heat and cold. Many species bask in the sun, choosing midday during spring and summer and early morning or late afternoon in the summer. Nocturnal snakes are able to passively exchange heat with the soil and air at night.
Snakes have also evolved to need little water. They hunt desert animals, and get necessary hydration primarily from their prey. They also do not need to eat daily.
Other adaptations are related to their physical structure. Snakes are able to avoid predators because their coloring mimics the desert's, making them less visible. Some snakes, such as sidewinders, have developed a form of locomotion that allows them to move across loose, windblown sand -- their body makes contact with the sand at only two points, allowing them to lurch sideways quite quickly. Other species have smooth scales, narrow heads, small eyes and counter-sunk lower jaws, which aids their breathing and movement in loose sand.