Silicon Valley’s appetite for data is well known. Its thirst is less understood.

Amid record drought in California and other parts of the American West, the machines that support everything from Instagram photos to Netflix movie marathons require substantial quantities of water for the air-conditioning systems needed to keep the servers cool.

California...