We have commercial farming because it takes that to feed us.
Even barring any future innovation in city planning (better distribution of sunlight, etc), architecture (tiered building design, whatever), and agriculture (crops optimized for greenhouses), we would still benefit from growing food on rooftops, so why wouldn't we?
Oh and by the way, you can use electricity (realistically from a mix of renewable and nuclear power) to keep "sunlight" on in your greenhouses; they don't need to be on rooftops.
I don't disagree that it doesn't scale vertically nearly as obviously as it does horizontally, but why make perfect be the enemy of better?
If you want a farm, put it on a farm. If you want a solar generator, put it in a clean well-lighted place. All this hybridization (rooftop farming, solar roads etc) is not sound engineering.
We may need to design our buildings to accommodate these kinds of problems, but that doesn't mean they should be dismissed outright -- The potential energy benefits are substantial.
It takes a just a small leap of imagination; we're not talking about magic.
If you take anything away from this discussion, let it be this:
> [Climate change effects] threaten future gains in commodity crop production and put rural livelihoods at risk. Numerous adaptation strategies are available to cope with adverse impacts of climate variability and change on agricultural production. These include altering what is produced, modifying the inputs used for production, adopting new technologies [emphasis mine], and adjusting management strategies. [1]