When copper(II) sulfate pentahydrade dissolves in water it actually just becomes further hydrated, in what is called an aquo complex (a coordination compound containing only water molecules as ligands). According to this Wikipedia article:
The pentahydrate ($\ce{CuSO4·5H2O}$), the most commonly encountered salt, is bright blue. It exothermically dissolves in water to give the aquo complex $\ce{[Cu(H2O)6]^2+}$, which has octahedral molecular geometry. The structure of the solid pentahydrate reveals a polymeric structure wherein copper is again octahedral but bound to four water ligands. The $\ce{Cu(II)(H2O)4}$ centers are interconnected by sulfate anions to form chains.
The aquo complex maintains the blue coloration that is present in the pentahydrate solid.