Sometimes farmland actually benefits from solar panels. In sunny and dry areas, providing shade can improve crop yields and/or reduce the need for watering.
For instance, there's a farm outside Denver, Colorado that has solar shading its vegetable fields.