Yes, you can get married while studying on a UK Student Visa. Being on a Student Visa does not prohibit you from getting married.