It is very common during wartime for the marriage rate to increase. This was certainly true in the United Kingdom and the United States during World War 2. The uncertainty of a future will often cause people to wed young.
[The United Kingdom] from a peak in 1940, when 426,1000 young couples – spurred on by the urgency of World War II – married for the first time... telegraph
Marriage rate rose sharply in the 1940s and reached all-time highs. After World War II, Americans began to marry at a younger age: the average age of a person at their first marriage dropped to 22.5 years for males and 20.1 for females, down from 24.3 for males and 21.5 for females in 1940. Getting married immediately after high school was becoming commonplace and women were increasingly under tremendous pressure to marry by the age of 20. wiki
- James and Lily Potter marry just out of Hogwarts during the height of the First Wizarding War
- Lupin and Tonks marry just before the dawn of the Second Wizarding War
- Bill and Fleur married during the Second Wizarding War
In fact, Mrs Weasley backs up this exact reasoning:
Mrs. Weasley - "It's all this uncertainty with You-Know-Who coming back, people think they might be dead tomorrow, so they're rushing all sorts of decisions [Bill & Fleur's engagement] they'd normally take time over. It was the same last time he was powerful, people eloping left, right, and center--"
Ginny "Including you and Dad"
Mrs. Weasley "Yes, well, your father and I were made for each other, what was the point of waiting?"
Harry Potter and The Half Blood Prince ch. 5 pg. 93
We also see people who did not marry young.
- Minerva McGonagall didn't marry until she was 47 (Pottermore)
- George Weasley married sometime after the Second Wizarding War
- Percy Weasley married sometime after the Second Wizarding War
- Cho eventually married a Muggle man