In writing the expression for the equililbrium constant, molar concentration of the species involved in the reaction are taken into account. We all know that the molar concentration of a substance implies number of moles per unit volume `("moles"// "volume") " or " ("mass// "volume")`. Since mass divided by volume represents density of the substance therefore molar concentration of a substance is directly related to its density.
Molar concentration `=(" No. of moles ")/(" Volume ") prop (" Mass ")/(" Volume ") (prop " density ")`
Density as we know, is intensive property and does not depend upon the mass of the substance. Consequently , molar concentration of a pure substance (solid or liquid) has always the same value and it can be ignored while writing the value of the equilibrium constant. However , for substances in gaseous state or in aqueous solution, the amount in a given volume can vary and their molar concentration does not remain constant and cannot be ignored while writing the expression for the equilibrium constant.