The decision from the world's highest court has been welcomed by developing nations at most risk from climate change.