First, Mars I think quite probably does have life, present day life, life very much living on the edge, but in the thin streaks of water and the droplets of salty water on ice / salt interfaces - if they exist - these could be habitats for life.
And - I think once a planet has life, it is probably quite hard for conditions to get to the point where no life is possible at all because life is so adaptable. Has to be completely frozen, more so than Mars - or else - so hot that no liquid water can form.
So, Earth has been a bit Mars like in the past - when it went through a snowball phase. With atmosphere though - but so cold that there may have been hardly any life on the surface. But obviously there was some, as we can trace evolution all the way through its snowball phase. And deep down, had habitats such as the hydrothermal vents, or lifeforms that can live in rocks kilometers below the surface - some of these lifeforms wouldn't notice these changes in the surface conditions. (Mars also may have lifeforms that live kilometers below the surface in its "hydrosphere" that don't notice the surface changes in temperature).
It's not likely to get as cold as that again though in the future. But eventually the oceans will boil. When it is too hot for liquid water, then there won't be much possibility of life left. That's about half a billion years from now (or a billion years, you get varying estimates).
We can't achieve that ourselves either, accidentally, at least not just by burning all our coal and oil reserves, there isn't enough to generate a runaway greenhouse effect - though enough of course to have a serious impact on climate and civilization. Will Earth's Ocean Boil Away?
Half a billion years is far enough in the future for humans to evolve a second time all the way from the very first multi-cellular lifeforms. So - probably won't be humans quite by then - unless preserved and reconstructed intentionally. At any rate don't need to be bothered about it for a while yet.