The number of responses shows that this isn’t a simple situation. The same is true for setting back the thermostat in your house. There’s so many variables that it’s difficult to come up with even a good rule of thumb.
One thing that’s a big factor is the fuel source. Electric is slow, but its efficiency is the same regardless of the tank temperature. Gas (or oil, but those are rare) is faster and can be quite efficient, but their efficiency actually goes down the hotter the water gets, since heat transfers faster when there’s a bigger temperature differential. This is a factor for boilers as well, where you can achieve something like 95% efficiency with a water temperature of 120 degrees but that goes down to 85% efficiency when you get close to boiling.
There’s also issues with efficiency ratings between different types of appliances. A traditional gas water heater that just has a simple heat exchanger up the middle and a standard flue is constantly losing heat up that flue no matter how well insulated it is. So there’s likely more benefits to setting that back than an already well-insulated electric water heater that has no penetrations through the tank other than the water pipes and wiring plus an additional insulation jacket around it.
Power vented high-efficiency water heaters (and furnaces and boilers too) can achieve the greatest gas efficiency, but those glowing fuel usage ratings almost never include the additional electricity they use for the draft fans, pumps, dampers, and other controls. A hot air furnace for instance can easily eat 1,000 watts in the blower, and even fairly simple hot water heating systems can still require a decently powerful pump, and pumping water is very energy intensive. Steam boilers look awful on paper because their maximum efficiency is pegged at about 85% (because they can’t condense the water vapor out of the exhaust gasses), except for the fact that they use virtually no electricity at all, except for the thermostat controls and possibly a tiny condensate pump. So just how all these different systems operate can have a huge impact on how well setbacks work.
In the case of shutting off a water heater for the day after it’s already been somewhat depleted by a shower, that would be more energy efficient than having it turn off say a half hour later after it’s already reheated, but how do you even control for such a scenario? Going back to how slow or fast different fuel sources are also has relevance to lifestyle. If you need the hot water right away when you get home, then there might not be much of a setback time left between leaving in the morning and returning in the evening. If you’re like me and shower before bed rather than in the morning, then you could theoretically only need hot water in the evening. You’d just have to put up with a cold shave or face washing, which I suppose can help wake you up. That would be more beneficial than two on/off cycles every day.
Even with HVAC systems this can be an issue. In my case, I live in a 100 year old apartment with essentially no wall insulation. So leaving the a/c running all day is pretty wasteful. However, when I get home in the evening and start cooking is also when the sun hits my apartment the hardest. So if I don’t have the a/c on at least an hour before I get home (or earlier if it’s really hot out) then it will never catch up and I’ll be sweating into the night as the heat radiates through the brick walls. If the a/c was oversized then it could handle that better (as would a water heater that was undersized), but that causes other problems like poor dehumidification (or not enough hot water to take a shower and run the dishwasher or laundry anywhere close to each other).
See how difficult this gets?