At the moment, there are a few groups trying to reach Mars, and a few groups who are trying to reach the Moon. Mars One has grabbed headlines lately, SpaceX states Mars colonization as its long term goal, and there are numerous smaller groups. For the Moon, there is the Google Lunar X prize, Shackleton Energy Corp, and OpenLuna, and again numerous other groups. Different space agencies have gone back and forth favoring one destination or the other at different times over history, and that is a matter of politics as much as science and technology. The arguments for each destination are many and varied, but can be grouped and outlined.
- Mars has a carbon dioxide atmosphere. The technology and resources needed to process that into oxygen and methane for fuel are not that demanding (page 11 here). At first hydrogen for the process would need to be brought from Earth, later the frozen water that exists in large quantities beneath its surface could be used.
- The frozen water on Mars would need to be dug up, melted, and separated from the soil it is mixed with. That takes heavy infrastructure, but nothing complicated. The frozen water is distributed over a large area too.
- The Moon has frozen deposits of volatiles1 in craters in permanent shade at its poles, and beneath the surface near the poles. How big these reserves are is still a matter of investigation, but there is a fair bit of evidence that they are quite substantial. They seem to be a mixture of chemicals, mostly water, some carbon dioxide, and others, and may be mixed with a lot of soil. How difficult it would be to extract them and process them is not yet clear. Because they are only in a few places, that are deep, and extremely cold, it could be complicated.
- Mars is really far away. With current technology it takes 6 to 10 months (depending on alignment of the planets and how much money is poured into the rocket) to get there, or get back, and launch windows occur every 2 years.
- The Moon is 3 days away at any time, there or back.
- The atmosphere of Mars makes it necessary to have heat shields on any lander, and to come in at the right angle and with the right orientation. But the atmosphere is not thick enough to slow a vehicle much as it comes in, just enough to heat it up. If rockets are used to slow the ship down, then they must handle firing into a wind whose dynamics constantly change as speed lowers from hypersonic to subsonic. If parachutes are used, they must handle supersonic velocities unless deployed only near the end. These are huge technical challenges.
- On the Moon shields aren't necessary, and there is never any complication with using rockets. A ship landing on the Moon can come in at any angle with any orientation. No aerobraking can be done to save fuel by using friction with an atmosphere to slow a ship down enough to enter orbit. Thus the delta V to get to either destination is similar. However, the technology needed to land is known, and can be scaled.
- Because of the time it takes to reach Mars, a ship needs to shield its occupants from radiation on the way. It may be possible to use the supplies of food and water already needed for the trip and the time on the surface for that, or that may not be enough. This is still not known. At any rate the required supplies make the ship much heavier, which adds considerable expense.
- Radio waves take between 3 and 20 minutes to make the trip between Earth and Mars, depending on how far apart they are. They take 1.3 seconds to go between Earth and the Moon. One interesting aspect of this is that it makes it possible to operate equipment on the Moon remotely from Earth, but that wouldn't work for Mars.
- Mars can be terraformed. At least, that seems to be the case, although it would take a vast, vast effort over centuries. There is much we don't know about this, but it seems like a reasonable, if ambitious, conjecture. There is enough water for shallow seas, and may be enough frozen carbon dioxide2 for an atmosphere about 30% the density of ours, very roughly, and plants could process that into oxygen.
- The Moon would open up the solar system if colonized. Because it has so little gravity and no atmosphere, and it is right next door, all the heavy stuff could be made there and launched from there, saving tremendously on the resources needed to send missions far and near. Some say space stations could be used instead, and resources from asteroids, and the Moon could be skipped. That puts a 3rd horse in this race. The factors in that one are distance weighing against, and low gravity weighing in favor.
- Mars may harbor life. 'Nuff said. Then again, that also complicates things, see the next list.
- The Moon is covered in very fine sharp dust that sticks to everything because it has a static charge. Breathing it in would be a health hazard because the fine particles would lodge in the lungs and could cause silicosis. Moving mechanical parts outdoors will need protection or things will seize. Seals will fail if not protected.
- Mars is also covered in fine dust that is not so sharp because it is weathered. But the fine particles remain suspended in the atmosphere and that makes it harder to keep them out of the indoors. Silicosis again is a hazard, and there are other toxic constituents as well. And the dust also has a static charge that makes it stick to everything.
- Mars has toxic chemicals in its soil. Perchlorates have been identified and may be widespread. They are toxic to people.
- Mars may harbor life. That life must be protected. Colonizing a planet while protecting its native life may be very difficult and would certainly require special precautions that add complexity and cost to such an endeavor.
- The Moon has 1/6 the gravity of Earth. Living long-term in such an environment may cause health problems, and muscles and bones could change so much that returning to Earth would be difficult or impossible. Mars has 2/5 the gravity of Earth. There is a better chance this can be adapted to. However, much is not known about this. The right exercise program may eliminate this problem. In other respects, different gravity levels each have a suite of advantages and disadvantages.
So. Depending on how people weigh the advantages and disadvantages of each place, some feel we should go to Mars first, some feel we should go to the Moon first. One extra spin on the argument is that if the Moon is colonized first, then sending a lot of stuff to Mars is much easier. But you have to build all the infrastructure on the Moon to do that, so maybe that should be a long term consideration, but first a base should be established on Mars. Once you get into all the possible combinations of missions, the question becomes even more complex than has been briefly conveyed here. There is more discussion of the possibilities here.
And we haven't even gotten into the more subjective qualities of each place. Does it matter more that Mars has a day the same length as Earth's and has an atmosphere that creates a sky a lot like we are used to here, or does it matter more that the Earth hangs in the sky on the Moon, big and beautiful?
1 - 'Volatiles' refers to any chemical that is lost to space when subjected to the barrage of radiation and particles from the Sun, on bodies that are too small to hold them by gravity or with the help of a magnetic field.
2 - The real carbon dioxide reserves on Mars are unknown. Models predict frozen CO2 mixed into the frozen water of the poles and in the ground. In the early history of Mars when the atmosphere was much thicker, carbon dioxide may have been sequestered in carbonate minerals such as calcium carbonate. See here, here, and here.