Eighteen is the age given for marriage in Pirkei Avos. For many reasons, 18 is a very practical age – by then a man has had an opportunity to learn a large amount of Torah. He is expected to be mature enough to support a family. The Gemora (Kiddushin 29b) says that from a perspective of guarding against sin, 16 is better and 14 is better yet. The Shulchan Aruch (Even HaEzer 1:3) says that the best way to perform the mitzvah of marriage is to get married at age 13.
The halachic deadline is age 20. If a man has not gotten married by age 20, the Gemora says that all of his days he will have sinful thoughts. A man who did not get married by age 20 is supposed to be beaten by the Beis Din until he agrees to get married. This is the halacha in Shulchan Aruch (Even HaEzer 1:3), though the Rama says that the custom nowadays is not to force people to get married. In any case, if he hasn’t gotten married by age 20, he should get married as soon as possible.
The Chachomim of the Gemora understood the nature of man and his drives very well. They suggested that a man should get married at 18, and that for protection against improper sexual urges, younger would be better. They said that putting off marriage to later than 20 would permanently warp his personality.
Today in Jewish society, it is unusual for a man to get married as young as 18, and most don’t even get married by 20, and it is almost unheard of for a man to get married younger than 18.