A legal challenge by a hereditary peer is threatening to derail the construction of a €100m solar farm that could provide enough energy to power 22,000 homes.