The Gemara in Kedushim (29b) says that Hashem waits for a boy to get married until he is 20 years old. If he is not married by then, says the gemara, he is subjecting himself to thoughts of aveira. The gemara says that the earlier the better. The Maharshal says that under no circumstances should one delay marriage past the age of 24, unless he is so attached to learning that he simply can’t tear himself away to get married. This doesn’t apply to anyone in the later generations according to the poskim.
What about girls?
Rav Shlomo Zalman Auerbach says that the right age for marrying off girls is 20, and they need not hurry to get married before that. (Aleihu Lo Yibol). Revach.