The solid particles possess potential energy due to the interatomic forces that hold the particles together at some mean fixed positions.
Hence, solids have definite shape and volume.
As per kinetic theory of gases, for an ideal gas, there are no forces between the molecules of a gas. Hence, gases neither have a definite volume nor shape.