Why is the pressure correction in the van der Waals equation proportional to (n/V)^2? The van der Waals equation for real gases is stated as follows:

$$\left(P + \frac{an^2}{V^2}\right)(V - nb) = nRT$$

For the coefficient $b$, we can reason out that more the number of molecules, the more volume will be occupied by the molecules (in turn reducing the free space available for the motion of the molecules). It must be linearly proportional to $n$ because $b$ represents the sum of the excluded volume of each molecule in a mole. Therefore, we must multiply it by $n$ to obtain the total excluded volume.

The coefficient $a$ is said to represent the strength of the intermolecular attractive forces. Intuitively, we can say that it must be proportional to the number of molecules per unit volume. The more the number of molecules around a molecule, the more attractive forces it shall feel.

Therefore, the correction term for pressure must be proportional to $\frac{n}{V}$. But we know that in reality, it is proportional to the square of $\frac{n}{V}$.

Why does it vary squarely?
Summing up the argument from the Wikipedia derivation, the reason it is proportional to $(\frac{1}{V_\mathrm m})^2$ where $V_\mathrm m=\frac Vn$ (the molar volume) comes from how the molecules experience the attractive force. The only molecules that experience a net attractive force are those close to the edge of the container because as we move toward the center of the container, the attractive forces on either side of a molecule cancel out. The force toward the center experienced by a molecule at the edge should be proportional to $(\frac{1}{V_\mathrm m})$. But we can also say that the number of molecules at the edge of the container should be proportional to $(\frac{1}{V_\mathrm m})$. So, by combining the proportionality constants into a single constant $a$, we obtain that the correction to the pressure should be $(\frac{a}{V_\mathrm m^2})=\frac {an^2}{V^2}$ .