Thickening Mars's Atmosphere
We are already knowledgeable about some aspects of the requirements needed to terraform Mars &amp; the Moon. As @David_Garcia_Bodego mentions in his comments, gravity is a major factor in celestial bodies being able to retain an atmosphere.

This is because the gravity of a celestial body affects the escape velocity  of that body. The other important factor is the surface temperature of the celestial body. This is why Titan, a satellite of Saturn, has a thick atmosphere, despite having a similar escape velocity to the Moon (Luna), it is much colder and has a thick atmosphere.

Another factor that assists Titan in maintaining a thick atmosphere is its distance from the Sun and the weaker effect of the solar wind at that distance. Also, Titan is protected by Saturn's magnetosphere.

I recommend reading:


What will happen to the air released from the Moon's Surface?
Could the Moon keep an atmosphere?


and the links contained within those questions.

Yes, these questions discuss the Moon and not Mars, but the information provided in those questions is applicable to Mars.

The graph below provides a visual of the gases a celestial body can retain in a atmosphere based on escape velocity and temperature.



Factors that act in favor of Mars being able to have a thick atmosphere are:


Mars is farther away from the Sun than Earth &amp; Luna so it experiences
a weaker solar wind.
The surface temperature of Mars is cold, which reduces the energy of
atmospheric molecules.


Factors that act against Mars being able to have a thick atmosphere are:


The gravity of Mars and subsequently the escape velocity of Mars is small.
The lack of a magnetosphere to shield the atmosphere from solar wind.