why are solids rigid and hard
Solids are hard and rigid because the intermolecular distances between solids are very less and the intermolecular forces operating between the molecules are very strong. Thus the molecules in solids are packed very close to each other. Hence they cannot move about freely and can only vibrate about their positions.
Because of this property, the solids are strong, rigid and cannot be compressed.