In the United States, corporations have constitutional rights. It's a concept known as corporate personhood, and over the years it's been shaped by court decisions and the occasional law.
The US isn't the only country to recognize corporate personhood. But in some other countries, citizens are using the same legal concepts to protect the environment. A recent article on Treehugger says that a New Zealand river may be the first river in the world to be granted personhood, which gives it rights and interests similar to those of a corporation.
New Zealand officials granted personhood to the Whanganui River as part of a settlement with the indigenous Whanganui River iwi. The iwi had filed several legal claims against New Zealand's government seeking to protect the river. In a New Zealand Herald article, a government official said the iwi have pursued protections for the river since 1873. The Treehugger article says the iwi have strong cultural ties to the river.
The Treehugger article also points out that New Zealand isn't the only country to invoke environmental personhood. Ecuador, renowned for its biodiversity and home to the Galapagos Islands, has granted rights to the environment in its constitution.