Ed Miliband faces a High Court battle over plans to build a vast solar farm that residents have warned will destroy the countryside.