Mohammed Idrees used to travel to London once or twice a year, but these days the Saudi civil servant is asking his wife and children to cut back on using the family car to save fuel and has installed a solar panel for the kitchen to reduce electricity costs.

For decades, Saudi nationals such as Mr. Idrees enjoyed a cozy lifestyle in the desert kingdom as its rulers spent hundreds of billions of dollars of its oil revenue to subsidize essentials such as fuel, water and electricity.

But...