Strange as it may seem, farming as it has been done since the advent of agriculture is one of the most wasteful practices of human civilization: The vast majority of sunlight on arable land hits bare dirt rather than driving photosynthesis, most of the water from rainfall or irrigation never touches roots, and most of the nutrients in soil are heterogeneously distributed and thus only marginally accessible. This is why a slate of long-incubating technologies are increasingly converging to transform the world's food supply over the next few decades: Hydroponics, aeroponics, and vertical farming.
Food subjugates the earth. There is 38% of the world’s surface devoted to agriculture, and crops consume 87% of water used globally.
--Agropolis
Imagine you're a bed-ridden convalescent, and your nurse decides to feed you according to the principles of land-based agriculture: Rather than bringing you your food and water in nice, small, efficient receptacles, she would bring thousands of times more than you need in a dumptruck, randomly throw or spray it in all directions, and you would have to sit with your mouth open and accept whatever happened to fly between your teeth. Needless to say, this would get expensive fast: To keep you alive with such techniques would involve truly gargantuan volumes of food and water.
But maybe your nurse practices modern irrigation, so rather than throwing the food in all directions, she limits her random flinging to a thirty-degree cone around you - much more efficient, but still awesomely expensive compared to the common sense approach of feeding only you and not the walls, floors, and ceiling around you. This is the basis of two highly promising avenues of alternative agriculture, hydroponics and aeroponics: Respectively, fluid or vapor-based direct channeling of water and nutrients to a plant's exposed roots under controlled conditions.
With hydroponics - already popular with artisan farmers and marijuana growers - the roots of the plant are maintained in a small, directed flow of recycled water that carries nutrients to the crops while unused water and nutrients are kept inside the system rather than washing away. In land-farming, an entire hydrological cycle would have to transpire - and all the solar energy used in the process wasted - before runoff into the ocean would find its way back to crops as new rainfall, and most of the nutrients washed into the sea wouldn't be replenished until geologic uplift and erosion had brought new minerals to the soil. With hydroponics, the water/nutrient system is locally closed, minus trivial losses to evaporation and mineral deposition.
Aeroponics is similar in conception, but roots are fed with nutrient-containing vapor rather than running water - an even more efficient approach, although it requires a greater degree of precision and control. At this level you are no longer dealing with water as a continuous abstraction, but as individual packets - little globules containing predictable amounts of food for the crops. This allows for a discrete, digital approach to managing inputs that would necessarily be much fuzzier if you were simply dumping nutrients into a fluid. Another advantage of aeroponics, although further in the future, is that it opens up the possibility of weightless farming (i.e., space applications), but that is beyond the scope of this discussion.
Now, despite the substantial costs of energy and equipment involved in these technologies, increasing economies of scale ultimately converge toward yield potentials far beyond what is possible with land-farming - in other words, the efficiencies compound and snowball. Coupled with the global transition to renewable energy, we see convergences on the horizon that will accelerate trends toward these alternative farming methods.
However, water and nutrients are not the only wasted essentials in land-farming: Firstly, most of the sunlight striking arable land does not reach crops - the vast majority touches only dirt, and contributes to the food supply only indirectly (i.e., by warming the soil, feeding microbes, etc). Secondly, crops only use a tiny sliver of the solar spectrum, so most of the energy in sunlight that does reach them is either reflected or wasted as heat - something the world already has too much of, thanks to greenhouse gas accumulation. So now we naturally ask ourselves whether the same thing can be done for sunlight that is done for water and nutrients in hydro- and aeroponics: Efficiently channeling solar energy to food crops, in the spectra they need.
We can call this concept "photoponics," for lack of a better term (as far as I've heard, anyway). The upshot of efficiently channeling and utilizing sunlight for food crops is that you need much less of it to achieve the same yields, or - more importantly - the same land footprint would produce much larger yields. If you can direct the sunlight to the plant rather than relying on a passive, straight line of sight between the crops and the Sun, you are no longer bound to a 2-dimensional plane: You can have multi-story facilities where crops are grown above each other, and don't need direct access to solar energy because it is channeled to them through specialized lenses, mirrors, or through a process of electrical storage and re-emission.
Thus we come to vertical farming. At present, cities around the world are dangerously dependent on food shipments from far-flung rural areas - some on the other side of the planet - because traditional farming techniques require flat land, and real estate prices in urban centers are such that the price of food grown there on commercial scales would be prohibitive: It is simply not practical to feed a large city from within itself using traditional land-based farming.
Should anything - war, terrorism, natural disaster, etc. - interrupt the food shipments to a major city for more than a few days, millions of people could end up going hungry, falling from first-world living standards to the brink of starvation at the drop of a hat. This is a very tenuous and unsustainable condition, but fortunately the solution is at least visible on the horizon.
At first, the applications of vertical farming are simple enough: Adding vertical racks to marginal areas of traditional farmland, with some arrangement of mirrors/lenses and irrigation apparatus to feed them. Over time, practices would be honed and the technology more broadly adapted - the height and efficiency of the vertical systems would increase, as would the area of their use. At some point, suburban environments would become commercially viable farmlands, making use of the leading-edge of vertical farming and "ponics" techniques to generate significant volumes of produce from modestly-sized parcels of land.
This is when we can begin to imagine the suburban or mid-range application of vertical farming: The community food supply. Technology at this point would still not be capable of making dense urban cores self-supporting, but it could do that for outlying communities with real estate prices mid-way between rural and urban. However, it would nonetheless help make cities more independent by allowing them to rely more on food from surrounding suburbs rather than distant agricultural belts in other states or even other countries.
The immediate manifestations would probably be one or a few substantially-sized complexes that feed into grocery stores and restaurants in the area. Over time, we could guess that economics and convenience would cause these functions to merge, and rather than having the farms feed into stores and restaurants - which would occur initially due to the outmoded model of distant farmlands - it would be likely that restaurants and groceries would be located at the farms. With growing decentralization and decreasing costs, the reverse would be true - a larger number of individual farms would be located at the restaurants and grocery stores.
With additional convergences - i.e., declining cost of building height thanks to advanced materials - vertical farming would penetrate more deeply into urban cores, comprising a larger and larger percentage of the food consumed in large cities until it becomes dominant. The holy grail, of course, would be that individual residential high-rises would generate their own food supply, but there are some intermediate steps along the way: For instance, dedicated farming skyscrapers, followed by the same convergence of farming, grocery, and restaurant seen in the suburban context. Eventually it would become more economical to distribute food production to each building rather than people traveling to eat.
What you get with such a future is truly amazing: Food with essentially no associated transportation cost, using a tiny fraction of the water, nutrients, and sunlight as traditionally farmed crops, and able to be grown wherever you feel like it. Growth in the food supply due to these developments - growth in healthy, nutritious food without the need for pesticides or questionable genetic manipulation - would be exponential, not merely linear, and would radically reduce consumption of all the things involved in farming: Land, water, and the transportation costs (both financial and environmental) associated with moving food over large distances. It would be greener, more sustainable, and the food healthier and more delicious than any farmer's market on the planet: You could literally pick the food off the vine that goes into the lunch made before your eyes, every single day as a matter of course, and cheaply.
Even more interestingly, vertical farming systems are likely to become modular and mass-produced - a veritable plug-and-play food supply. Granted, this would be at the end-stage of the development process, but it seems to be the natural conclusion: Farming included as a fixture in standard building construction, right alongside lighting and plumbing. Your home would no longer be merely a box for stuff, but a kind of ecosystem - on one end of the economic ladder, merely a small branch on the larger system comprising your apartment building; on the other, your home is practically an ecology unto itself.
As with all technology, the developmental path is not a straight one: It involves many converging avenues of progress, and some will lurch forward while others grind to a halt, but the trajectory of change is not in question - this will happen. Optimistic voices, such as those spearheading Agropolis, foresee the first commercial vertical farms within a decade. I tend to view technological development through the lens of Hofstadter's Law, so I usually multiply optimistic projections by two to get a reasonable estimate, and by three to get the depressing/cynical view: Entry to market in 20-30 years, with exponential growth following.
My guess is that the most time-consuming hurdles to overcome will be psychological rather than technological: First showing that it can be done, then it showing that it's economical, then convincing landowners that it's not some kooky niche application but a serious, profitable, and community-oriented idea. This is why I think it will probably proceed first from marginal rural farmlands - i.e., with low-rise vertical racks a few stories tall, in a few acre-sized patches - rather than beginning with flashy projects inside cities.
Here is a brief presentation made by Agropolis at the Singularity University:
As an additional thought, I think with vertical farming the swaths of land currently devoted to agriculture could be allowed to return to a natural state, or - if the natural state is not very beneficial to ecology - could be cultivated into forest lands or other types of wilderness.