How do bodies of water affect desert climates?

It depends on which way the wind blows. The Atacama desert of Peru lies adjacent to the Pacific Ocean, but the winds blow mostly offshore, so that little moisture ever accumulates above the desert. Atacama rainfall averages about 1 mm per year- the driest desert in the world, next to the largest body of water.
But large bodies of water typically mediate surrounding temperatures, by acting as heat sinks that absorb and release heat. Coastal areas such as San Francisco and San Diego experience much smaller temperature swings than communities further inland.

And the presence of nearby sources of evaporative moisture will also lead to more frequent exchanges of that moisture, via rainfalls. The air over the Florida peninsula typically produces a daily rainfall at 4 PM daily.

But a dominating influence on rainfall is altitude; if you live on the downwind side of a mountain range, then the air that reaches you has been leached of moisture by its trip upwards over the range. If you live on the upstream side, you will be the beneficiary of the moisture that falls from the rising air mass.

A good place to observe that difference is a trip across the Rockies through Glacier Park, from Idaho into Montana. The differences between the upstream (Idaho) forest and the downstream (Montana) forests are striking.