A court ruled that the government violated the rights of children by failing to protect them from climate change.