Why not just do

f[a_,t_]:=NIntegrate[Exp[-a q^2] MathieuS[a,q,t],{q,0,Infty}]?

(Your definition as f(q) is, perhaps, not terribly good, because the q is the dummy variable of integration!). Also, note that "Infty" stands for infinity. You should use the actual symbol, because "Infty" is not recognized as an appropriate upper limit of integration. I'm forgetting what the text version of Infinity is, since I always use the symbol from the palette.

Now you can do plots or whatever you like with f.