Step 1: Short answer:
Hardness is caused by the salts of the two common alkaline earth metals in natural water, calcium and magnesium.
Step 2: Reasoning:
Rain water flows over limestone and dolomite rock, which dissolve as bicarbonates of $\text{Ca}$ and $\text{Mg}$. These ions then react with soap anions and give a curdy precipitate, which is the visible sign of hardness.
Heavy metal ions such as $\text{Hg}^{2+}$ or $\text{Pb}^{2+}$ and noble metal ions such as $\text{Ag}^+$ and $\text{Au}^{3+}$ are rare in ordinary water, and $\text{CN}^-$ is not a metal ion at all. So only option C fits.
Final Answer:
Hardness is due to $\text{Ca}^{2+}$ and $\text{Mg}^{2+}$ ions, which is option (C).
\[ \boxed{\text{Ca}^{2+}\ \text{and}\ \text{Mg}^{2+}} \]