Interaction between cation and anion that leads to formation of insoluble salts is driving force in a precipitation reaction. For example, consider the following precipitation reaction for the formation of white ppt of AgCl .
AgNO3+KCl⇌KNO3+AgCl↓(whiteppt) Sic, ppt of AgCl is formed, silver ions are removed from the solution. To nullify the effect of the decrease in the concentration of silver ions, the equilibrium shifts to right. This is in accordance with Le chatelier's principle.