Deserts are dry because the air above them is lacking moisture. This is caused by rain shadows, moisture sources being too far away, cold ocean currents nearby or the Earth's circulation patterns.
Rain shadows occur when air regularly passes over a mountain before it reaches the desert. As the air goes up the mountain, it begins to cool, and the moisture in the air diminishes. A similar thing happens when cold ocean currents cause air to lose moisture before it reaches land. Deserts and other areas that are far away from water sources get air that has lost most of its moisture already.