Both temperature and air pressure affect the form of matter. However, temperature contributes more to the form of matter.
By raising the temperature, you're adding energy. This energy gives the individual molecules/atoms the ability to overcome the forces that hold them together. This can be seen with a solid to a liquid or a liquid to a gas.
On the other hand, y lowering the temperature, you're removing energy. The lack of energy results in less movement. Gases condense into liquid because they don't have enough energy to stay away from each other. Liquids solidify because they don't have enough energy to slide past each other; they get stuck in place.