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.