We study hydrated magnesium sulfate minerals from first-principles calculations based on density-functional theory. We determine the heat of hydration for MgSO4·nH2O, compute the Raman and infrared spectra for several phases and calculate the S isotope partitioning as a function of hydration. We find that epsomite and meridianiite with, respectively, n = 7 and n = 11 water molecules per MgSO4 unit are particularly stable with respect to other individual or combinations of hydration states. The Raman spectra of all phases present clear SO4 features that are easily identifiable. We use this to show one can use the vibrational spectroscopic information as an identification tool in a remote environment, like the martian surface. We discuss the character and atomic displacement pattern of all vibration modes and compute the 34S/32S partitioning; this work shows that hydration favors enrichment in the lighter S isotope 32S with respect to the heavier 34S, which is accumulated in the less hydrous structures. We show for the first time that the signature of 34S/32S partitioning could be observed by in situ spectroscopy on the surface of Mars. Moreover this can be related to the diurnal cycle of hydration and dehydration and hence it can improve the modeling of the water circulation on Mars.