To grow one $\rm m^2$ of crop plants, how many $\rm m^2$ of solar panels do you need? In vertical farms you need to use LEDs to make plants grow, which in turn have to be powered e.g. by solar panels. If solar panels had the same efficiency as plants, then you would need the same amount of solar panels as you had plants before, if your LEDs had perfect efficiency. So the claim that vertical farms would use less surface area seems strange at first.
But it appears that solar panels are more efficient than plants. Although the accepted (at the time of writing) answer focused on creating electricity (burning biofuels), which is advantageous to solar panels as there are no further conversion steps.
So the question is, does it make sense to go the (Sunlight -> solarpanel -> electricity -> light -> plant) detour?
As you probably lose efficiency in every step this seems wrong intuitively, but reasons this might make sense are:

*

*plants might be able to convert a smaller percentage of the light spectrum into energy, if solar panels can capture the entire spectrum and LEDs produce only that spectrum, you gain some efficiency

*plants might only be able to use energy up to a certain point and "throw the rest away". If solar panels can capture all the energy you could split it up to multiple plants with dimmer lights

So the question is: To grow one square meter of crop plants, how many square meters of solar panels do you need?
(This might depend on the latitude)
 A: The most efficient solar panel boasts with an efficiency of 22.8%. While the best case for plants have 28.2% of sunlight absorbed by chlorophyll. Even if there are further energy losses in its path to become sugar the vertical farm doesn't circumvent those steps and is therefore irrelevant. So assuming the most generous case (100% electricity -> absorbed by chlorophyll) you would still end up using about $1/3$ more land area to provide for your vertical farm.
Traditional farming requires fertile soil, abundant water and sunlight. While the vertical farm setup only requires 1 of the 3. The solar panels could be located in a sunny location not suitable for crops while the vertical farm could be located next to the food processing plant. This way it doesn't compete with traditional farming for space and also reduce carbon emissions associated with transport. Farming in a closed environment reduces the need for pesticides to $0$ and also reduces water losses due to evaporation and drainage to effectively $0$.
So the answer to your question would be: It depends. If you have abundant fertile soils and water then the good old fashioned way is hard to beat. Scarce water, wasteland unsuitable for anything else? Then yea vertical farming could make perfect sense.
EDIT: There is also the alternative of using greenhouses on said wasteland. In that case I don't really see a case for using vertical farms powered by solar panels with technology available today.
A: A few consideratiosn to take into account:

*

*The amount of energy absorbed by plants on a $1m^2$ depends on the type of the plants, their density, how efficiently they cover the area with their leaves, etc. In other words, the main gain may come from the fact that a solar panel covers $1m^2$ continuously, using the surface more efficiently.

*If plants absorb fraction $\alpha$ of light, whereas the solar panels absorb fraction $\beta$, then plants will end up absorbing fraction $\alpha\beta$. One however could play on the solar panels absorbing wider spectrum and then illuminating plants with a more efficient light.

*Plants, solar panels and any other devices or organisms do use only part of the available energy and throw the rest away - throwing away a part of the available energy is required by the second law of thermodynamics (often neglected in the green energy debates).

*Burning a battery actually produces more energy than using it to power an electric circuit... it is just that harnessing this energy is challenging.

