This idea goes back in 1967. James Lovelock, originator of the Gaia hypothesis, found a way to use a planetary atmosphere to detect life. He suggested that we look for simultaneous presence of pairs of gases like oxygen and methane that react together. We can also search for gases such as oxygen above levels expected from abiotic processes.
As far as we can see, Mars atmosphere seems to be close to equilibrium in this way. So when Viking I and II landed there in 1976, and found a barren desert-like surface, it seemed natural to conclude that there is no life on Mars.