Energy firm Vattenfall has been given the green light to divest its lignite coal plants as it looks to focus on clean energy.