We observe that most of the deserts are on the western sides of the continents in the subtropics. These are the results of the prevailing easterly winds of the tropics, which are the trade winds. The trade winds prevail in the lower portion of the earth’s atmosphere, in the lower section of the troposphere.
These winds become dry when they reach the western sides of the continents, and hence don’t bring any rain with them. As these regions become devoid of moisture, deserts are formed.
The earth rotates on the East side. Moving air is deflected by the Earth’s rotation. Air in the tropical regions moves in the direction of the equator, while air in the northern hemisphere deflects towards right and southern towards left. All this happens according to the Earth’s rotation.
Now, the air that comes from Northern hemisphere when deflects towards west, it turns to the west, geographically. Similarly, the air from Southern hemisphere when deflects towards left, that also turns to the geographic west. Hence the whole air runs towards the west where it slowly loses its moisture travelling the west side.