It's missing a semi-colon after the For loop.
In[1]:= f[n_] := Module[{i, s = 0},
For[i = 1, i <= 100, i++, s = s + 1/i^n];
s
]
In[2]:= f[2]
Out[2]= 15895086941330378731122979285175538597023834985437098598894328\
34803818131090369901/\
9721861444343810305896579766726231441619755839957462417827203547055179\
86165248000