Astronomers have for the first time discovered water in the atmosphere of a planet orbiting within the habitable zone of a distant star.