Answer
See the detailed answer below.
Work Step by Step
In liquid and solids, the atmos are closer to each other which makes the repulsive electric force between the atoms larger. We know that each atom is having electrons (negative charge particles) surrounding it. These electrons repulse with the electrons with the neighborhood atoms.
The smaller the distance between atoms (or molecules), the greater the repulsive force between the atoms. And the greater the repulsive force between the atoms, the greater the resistance of being compressed.
In gases, in contrast with solids and liquids, the atoms (or molecules) are freely moving in all directions and the repulsive force is negligible. They have more room to move in all directions. Atoms and molecules move more independently.
The smaller the repulsive force, the smaller the resistance of being compressed.