In the theorical sense, sure. We could cover all of the world's needs with a solar panel in the Sahara that's 700 km on each side and handwave the transmission lines for that.
The real world however, a farmer owns a specific plot of land, has $w of capital in the back, owes $x in loans, owes y tons of crop, owns z tractors and seeds. Without centralized planning, plopping down solar panels in an optimal place isn't how the real world works.
That is exactly how the real world works, as evidenced by the enormous number of purpose built solar sites and the vanishingly small number of dual use solar fields.