Liquids are not rigid because the intermolecular forces of attraction between its molecules are not strong enough to hold them as closely as solids, but they are strong enough to ensure that liquids occupy a definite volume.
The answer of this question is similar to the questions why solids are solid and gases are gas? The answer is that in solids the intermolecular forces between the atoms of solid is very strong and...