Both complexes contain Fe(II) (d$^6$), but the ligands differ in field strength. CN$^-$ is a strong-field ligand and produces a large octahedral splitting ($\Delta_\text{o}$), giving a low-spin configuration $t_{2g}^{6}e_g^{0}$, while H$_2$O is a weak-field ligand with smaller $\Delta_\text{o}$, often giving higher-spin populations.
Because $\Delta_\text{o}$ is different, the energy of the $d\!\to d$ electronic transition (and thus the wavelength of light absorbed) differs for the two complexes. They therefore absorb different parts of the visible spectrum and appear different in colour (e.g., [Fe(CN)$_6$]$^{4-}$ is very pale/yellowish, while [Fe(H$_2$O)$_6$]$^{2+}$ is pale green). Hence, colour difference arises from differing crystal-field splitting due to ligand field strength.