Just because you are pregnant. Years ago couples did the shot gun wedding thing all the time. Sometimes it worked out. Usually it was a recipe for household hell. If you don't want your child to be a bastard don't have sex outside of wedlock.
Don't marry a last chance man. Women's fertility is finite. The feminists lied to you, sweetie. We bloom like roses and then decline. By the time you hit your 30s there aren't too many more shopping days until Christmas so to speak. Don't pick a man just because you want him to be a stud. Studs usually move on to other females and you may find that settling for a man because he's your last chance to be a mother is more than you ever bargained for. Besides, it's unfair to the man. You should marry a guy because he's the one, not because he's pleasant enough, has a job,is good with kids and has working parts.
Don't marry because you're lonely. Figure out why you are alone or embrace it but don't misuse the sacrament.
Don't marry for sex.