The Moon has (relatively) easy access to most basic elements.
This isn't really an advantage, per se, as Mars also has easy access to these elements. But it's worth noting as some answers on the other page suggest this is an advantage for Mars.
As noted in a Wikipedia article1 the surface is about 45% silica (useful for electronics and solar panels), 15-24% alumina and 6-14% iron oxide (both useful for structural materials and electrical conduction). Additionally, an Artemis project article2 suggests the top 1-2 meters are about 82 ppm carbon, useful for turning iron into steel.
There's plenty of oxygen, calcium, magnesium, and sodium on the Moon for human needs. An abstract3 from a Lunar and Planetary Science conference suggests potassium is present in concentrations from 500 to 10000 ppm.
The one problem here is a need for hydrogen (to make water) or water itself. For a long time, there's was only speculation about water ice at the Lunar poles, but it was finally observed directly in 2018. A NASA article45 suggests there's quite a bit of it, but I can't find any data on just how much.
Alternately, another NASA article6 says there's about 45 ppmw hydrogen in the soil near the poles. That's promising, but it would take a lot of work to turn that into useful amounts of water.
There's some indication of subterranean (sublunanean?) water up there, but again I have no idea if there's enough to be useful. A NASA article about LCROSS7 says they found evidence of ice inside the regolith that was ejected when a booster impacted the ground. It sounds promising, with phrases like "vast quantities of hydrogen that have been observed at the lunar poles", but "vast quantities" is likely a very different term in astrogeology than in space exploration.
The Moon is a lot closer to the Earth.
This one is obvious, but bears repeating.
- It takes a little more fuel to get to the Moon, but far less time.Note 1
- It allows near-instantaneous communication compared to Mars' 10-45 minute round-trip delay. This applies both to official communication and personal communication. It's a lot harder on long-distance relationships when you can't have a real conversation.
- A major catastrophe is more likely to be survivable if we can get another rocket up there quickly.
- There's a much shorter turnover time for people to come home.
- You can see Earth as an actual place, not just a dot in the sky.
The Moon is closer to the Sun.
This is mainly advantageous for Solar energy. Mars is about 52% further away from the Sun than the Earth-Moon system. This gives the Moon 2.3 times the Solar energy per unit area than Mars.
The Moon could potentially be used as a technological stepping stone to Mars.
Many of the challenges of setting up a Moon colony will be present on Mars. This isn't in favor of going to the Moon instead of Mars, but possibly in favor of going there before Mars.
- Both surfaces are in near-vacuum, requiring sealed habitation.
- Both places will require hydroponics or similar technologies, as large-scale agriculture won't be possible.
- Both places lack suitable facilities for many of the activities normal humans entertain ourselves with. No sports, no biking or hiking, no tinkering with sports cars. Figuring out how to keep boredom and depression from setting in will be similar in both cases.
- Both places have low gravity that requires more medical understanding to overcome the long-term effects. On the one hand, the Moon's lower gravity makes it harder, but it also means figuring it out will make Mars a cakewalk. And the Moon's proximity means we can do shorter stints if needed to offset the larger gravity differential.
Of course, many of the challenges will be different enough that it won't help at all. Some people think it won't really make a big difference either way.
- Landing a spaceship is totally different (even the rarefied Martian atmosphere makes a huge difference in how you slow down).
- The communication times mean Martian settlers will have to get used to being more independent, and get used to harder long-distance relationships.
- Martians won't be able to play Counter-Strike with their friends back on Earth.
- Just getting to Mars will take longer than a typical ISS mission lasts.
The Moon could be used as a literal stepping stone to get to Mars.
If we can process raw materials into spaceships and rocket fuel on the Moon, we can build larger, nicer spaceships that require far less energy to reach Mars from the Moon than launching them from Earth. Then we can launch smaller, lighter spaceships from Earth to the Moon that simply need to carry the passengers themselves instead of an entire life support system for getting them to Mars.
A Moon base would be cool.
I don't think Congress is going to accept this as a valid argument for budgeting hundreds of billions of dollars, but it's true. Who doesn't want to point a telescope at the Moon from their back yard and wave at the people who don't know you exist?
Notes
Note 1: In its simplest form, the fuel cost to get from Earth to somewhere else is determined by the sum of Delta-Vs between each point along the trip. From Earth, you'd need around 10 km/s just to get into Earth orbit, then some extra to escape Earth's gravity, then some extra to get pointed towards Mars, then some to insert into Mars orbit, then some to slow down to hit the atmosphere, then some to get stopped.
The advantage of going to Mars is that we can accomplish the last bit (slowing down in the atmosphere) using parachutes or similar instead of using a rocket, so the total Delta-V is less than if we used rockets the whole way.
One Reddit post8 has a chart giving a total Delta-V from Earth to the Moon of 15.07 km/s versus 15.11 km/s to get to a low Mars orbit. A Quora answer9 has a similar chart giving the exact same totals in a slightly different fashion.
This implies the trip to Mars uses a tiny bit more fuel, but I don't think it's completely accurate. According to a Discover Magazine article10, Mars 2020 doesn't release its parachute until 10 km above the ground, which initially made me think most of the 3.8 km/s Delta-V would have to be done by rockets.
However, an animated graphic of the Curiosity landing11 says it was doing around 18300 kph (5.1 km/s) when its last rocket ejected, at an altitude of 1500 km. It's down to 3000 kmh (0.83 km/s) when the parachute opens, then at 275 kph (0.076 km/s) it uses landing thrusters to finally stop.
That's just over 5 km/s of purely aero effects, or 1.2 km/s more than my calculation. Taking that into account, it's only 13.91 km/s to Mars and 15.07 to the Moon.
References
1 A Wikipedia article, Geology of the Moon: Elemental composition
2 A 2008 Artemis Project article, Carbon on the Moon
3 A 1995 article from Harvard's astrophysics data system, Potassium and Sodium Abundances on the Lunar Surface: Implications for Atmospheric Composition
4 A 2018 article from NASA, Ice Confirmed at the Moon’s Poles
5 The 2018 study cited in the above NASA article, Direct evidence of surface exposed water ice in the lunar polar regions
6 A 2015 article from NASA, NASA's LRO Discovers Lunar Hydrogen More Abundant on Moon's Pole-Facing Slopes
7 A 2009 article from NASA, LCROSS Impact Data Indicates Water on Moon
8 A 2014-ish Reddit post, Delta-V Map of the Solar System
9 An answer on a Quora question, How much deltaV is required to reach Mars, without coming back?
10 A Discovery Magazine article, NASA Tested the Parachute for its Mars 2020 Rover, Says it’s go for Launch
11 An animated graphic on the NASA article for Mars 2020, Entry, Descent, and Landing Of note, the graphic is for Curiosity some years ago, and will get updated sometime this year for Mars 2020, so my answer will be out of date for that.