All you need to do is add up the mass of each component, as if it was 1 gm mole.
So you have MgSO4.7H2O
Mg = 24.3, S = 32 O = 16 H = 1
24.3 + 32 + 64 + 14 + 112 = 246.3
Water H2O is 18 so 7 moles of water is 126.
So in 246.3 gm of magnesium sulphate heptahydrate contains 126 gm of water.
Percentage = 100 x 126/246.3 = 51.16 %