Why is the air at high altitude colder?
I mean, in a typical small-scale case, hot air rises to the top. If it's hot below and cold above, convection should turn all the air upside down real quick, so it's extremely hard to keep such an upside-down state. So why does it happen in nature?
Sunlight is absorbed mostly by ground / sea, that is where the air is heated; the air high above radiates its heat into space, as infrared radiation. So, temperature gradient buildup is to be expected.
But why is it not equilibrated by convection? That is because of pressure. If you take a bunch of air and pull it up into the stratosphere, it will have to expand to match with lowering pressure around it, and thus get cooler. So, convection won't start before that adiabatic temperature change is overcome. Or if that adiabatic temperature change is reduced by condensing moisture - then, a thunderstorm is likely to form.

So, we could use that temperature difference to generate power. As a byproduct, we heat the stratosphere, which will then radiate more heat into space, eventually cooling our Earth =)
Hi, interesting idea! That reminds me a bit of the concept of a solar updraft tower (https://en.wikipedia.org/wiki/Solar_updraft_tower) but there, the thermal energy is not circulated.
What about using water as a medium? It is much denser so the convection flow might be stronger. As in: heat water up, let it rise by convection through pipes and include generators into the pipes. Cooling it via heat-transfer should speed up the process.
But I also don't know if this is practical (why not use the thermal energy gathered to power a stirling engine in the first place?). Anyhow, cool idea!