I thought many times while crawling through scorching attics that there must be a way to use this heat for something good. Here in the south, hot summers are the 1 weather feature that changes little, except for a few mountain areas. I would not put a standard water heater in an attic but unbroken water lines could coil through or a "penthouse" built on the roof to hold several tanks. With steady sun and 90+degrees most days, a lot of water can be heated. Imagine 3 or 4 55 gallon drums, with water lines running in a PVC chase from crawlspace. As water is used, 1st drum loses hot water but gains hot water from 2nd drum. 2nd gets hot water from 1st, partly diluted by incoming cold water. With any average user, this would give hot water 24 hours a day all through June, July & August.
I also had the thought that many buildings could be built to use cold weather in a similar way. Imagine a restaurant in cold winter zones. Walk in coolers could be built on the outside walls, partly using cold outdoor air to cool the space, naturally with backup mechanical cooling. Intake vents could also bring in cold outside air.
I did a job in a glass walled office building in mid winter. Mostly about 20 degree daytime weather. Come in at 7:00 building like a freezer. Soon as sun hit any section, it was hot. Go to shady side, nearly as cold as outside. Many of you have seen similar, I'm sure.