A desert is a dry area of a planet that has very few sources of water. Desert areas could be found on many class M planets, and some planets, even M-class, seem to be largely or entirely covered by desert.
Worlds which had deserts among other climates include Gaia, Lactra VII, and the Genesis Planet. (DS9: "Children of Time"; TAS: "The Eye of the Beholder"; Star Trek III: The Search for Spock) Vulcan was another planet largely covered by deserts, the most famous of which was Vulcan's Forge. Other worlds which seem to have been dominated by deserts include Nimbus III, Motherlode, Lambda Paz, Kolarus III, and Ocampa (which was turned into a desert after a disaster in the 14th century). (Star Trek V: The Final Frontier; TAS: "Mudd's Passion"; TNG: "Final Mission"; Star Trek Nemesis; VOY: "Caretaker")
Earth had several desert areas, including the Sahara Desert. However, by the 23rd century, terraforming technology had allowed some of Earth's deserts to be converted into green parkland. The Mojave desert was one such area so converted. (TOS: "The Cage")
Nevada had large deserts. The American city of Las Vegas was built there in the early 20th century. Nuclear weapons were tested there, such as one detonated there in 1947. (DS9: "Badda-Bing, Badda-Bang", "Little Green Men") In 2375, Las Vegas citizen Vic Fontaine expressed his concern that he might end up "buried in the desert" if the Deep Space 9 crew failed to successfully rob Carl Zeemo's casino. (DS9: "Badda-Bing, Badda-Bang")
Jonathan Archer and Trip Tucker underwent Starfleet survival training in the desert of the Australian outback for two weeks in the 2140s. Tucker later recalled how the heat and dry air of the desert sucked the life out of him. He and Archer ultimately ended up in a similar situation once again when, in 2152, circumstances left them stranded on the desert planet that was the Torothan homeworld. (ENT: "Desert Crossing")