Solar farms on farmland? That won't scale to the energy needs of 8bn+ people if we still want to keep feeding them. Especially a non-vegetarian diet.
Leaves farmland, if you want to do this kind of thing at any sort of required scale. (Sure you can put solar cells on barn roofs, but the premise was scale magnitudes beyond that.)
In fact, most plants can only use sunlight for a few hours a day, and must then endure the heat for the rest of the day. A few crops -- wheat, corn -- offer slightly reduced yields when shaded, but many others -- particularly peppers -- yield better with partial shade. Even where yield is reduced, the extra year-round revenue and radically reduced water loss may even the score.