Can a student with a student visa get married in the US?

sure you can, and then you get to stay here as well. Yes, but marriage does not automatically confer permanent resident status or citizenship to the foreign spouse.