The Fe2+ in complex [Fe(H2O)6]2+ is having 3d64s0 configuration and the H2O is a weak field ligand which implies the pairing energy is more than the the the excitation energy hence pairing of electrons do not take place and hence it is paramagnetic in nature whereas Fe2+ in the complex [Fe(CN)6]2+ is coordinated with a strong field ligand CN and such that the excitation energy is greater than pairing energy and therefore pairing occurs making the complex diamagnetic in nature.