The effect of pH and solubility on coagulation in water treatment
To start, I assume you are speaking of metal salt coagulants such as aluminum sulfate (alum) and ferric chloride, as these are the most commonly used. As you have stated, their solubility is affected by pH, the simplest representation of the reaction for alum being:
$$\ce{Al^3+ + 3H2O &lt;=&gt; Al(OH)3,_s + 3H+}$$

Small particles in the water such as clay or bacteria are too small to settle out on their own. The purpose of coagulation is to either cause the smaller particles to aggregate and settle or to trap them during precipitation. Coagulation occurs via three main mechanisms: (1) sweep - where the metal salts precipitate (i.e., solubility) and capture particles/contaminants like a net; (2) adsorption/charge neutralization - where the positive charges on the Al and Fe cations neutralize the negatively charged e.g., clay, bacteria, etc., causing them to aggregate and settle out; (3) adsorption and bridging - where a polymer coagulant can be used to "bridge" together like charged particles, causing them to aggregate and settle out. All are affected by solubility, but sweep is the mechanism that uses precipitation of the metal salts to remove particulates.

The mechanism you will want to choose will depend on the source water and the coagulant. The mechanisms are controlled by pH and solubility. Below are the solubility diagrams for alum and ferric chloride, with solubility represented on the left y-axis, dose on the right y-axis, and pH on the x-axis. As you will see, the shaded areas are the regions for achieving optimal coagulation, depending on the mechanism you desire. For example, if your laboratory tests showed that sweep coagulation was the best for your source water and you chose alum, then you would want to be at a pH between ~7 to 8 and an alum dose of ~15 to 60 mg/L alum (the "optimal sweep" circle). This pH and dose would result in the desired solubility behavior to achieve optimum sweep conditions.

*Figure 9-11 from MWH Water Treatment: Principles and Design, 3rd Ed (Crittenden)