Legislation that will protect and enhance the environment for future generations has now passed into UK law.