Recycling air is simple easy, so is recycling water (and human waste even), spaceships/stations have been doing it for decades. The real hang ups are food production and dealing with garbage.
Also the problem with the Moon is it is effectively a detour on the way to Mars. It won't help us develop anything new we couldn't already figure out already before going to Mars (why test habitats on the moon if the first step is testing on Earth anyways. After that you go to LEO for a bit), and it doesn't actually have all that good of a selection of the resources needed to sustain life. Decent for mining, I suppose, but it's still less fuel to take a Hohmann to and from an asteroid to mine stuff), but there's little water there, and nothing much in the way o materials needed to create life support gases.
If you're really interested in space colonization, check out what Buzz Aldrin has been up to lately. The second man on the Moon says, "screw going back there, get your ass to Mars"