It is possible to plant crops under wind turbines or solar panels, although there are considerations to take into account depending on what is intended to be planted.
While wind development projects require large amounts of land, the individual turbines themselves only take up as little as 1/2 acre of land, leaving much of the land undisturbed. This allows farmers to plant crops and continue farm operations on the majority of their land without issue. The turbines will not limit sunlight for the crops and wind developers can work around irrigation systems to ensure that they do not impede irrigation for crops.
For solar energy developments, there is more to take into consideration in terms of planting under solar arrays. Solar panels utilize more of the land that they cover than turbines and are sometimes low to the ground which raises questions about what can be planted underneath, as taller plants or ones that require mechanical harvesting may not be feasible. Panels can be raised to mitigate some of this issue and allow a wider variety of plants under the panels. It is an increasingly common practice to plant native vegetation or pollinator-friendly species under solar arrays, which has environmental benefits. An emerging area of research is in agrivoltaics, focused on the feasibility of co-location of solar development and agriculture on the same piece of land. There are many factors of consideration in this, including the challenge of using farm equipment around the structures.