Actually marriage needs not to be legal at all, it needs the wife and the husband to agree upon being husband and wife and in cases it is also required that the bride's father agree upon his daughter's marriage as well. So that they can marry at any age that they want and Islam allows them, although if they want their marriage to be legally provable they should record it somewhere. However, no one can forbid what Allah has allowed and no one can allow what Allah has forbidden. According to Islam when the human body is grown enough to have its sexual organs coming to be functional the person is allowed to marry, for either male or female, that is, at the age of 9 (or some say around 13 as this age may vary from region to region depending on the race, climate and etc.) for females and 15 for males. Nowhere Islam obligate males or females to marry as soon as they reach these ages, although always encourage them to marry as soon as they can. Only if the man or woman needs to have some kind of relation with the opposite gender, be it sexual or not, then it will be obligatory for him/her to marry. Increasing the marriage age however is always a discouraged action, there may be cases --as there are many-- that need such a relation but they find it socially unacceptable so that they will either decide to suffer until reaching the marriage age or to open an Islamically forbidden relation with the other gender, making friendships and even having sexual relations, all being some levels of Zina. Thus it is encouraged to lower the marriage age to the age that Islam has allowed, so that everyone who needs or anyway likes and can would be able to marry easily without fear of laws or social traditions. Based on these explanations it can be Islamically admitted to rise the marriage age temporarily during wars and other critical situations, if Allah' Caliph on the Earth will command so, however other than temporarily it might be anti-Islamic as it can cause sins to spread in the hearts of every youths. I said it might be as we also have a concept called "temporal marriage" in Islam, although only Shia Muslims now allow it. However, temporal marriage is not a complete solution as the classic marriage, mainly being a solution to reduce Zina to its least possibility (according to a Hadeeth from Imam Ali peace be upon him), so that rising the marriage age still might be unti-Islamic.
PS. Actually social traditions have changed much in the course of time, in past the marriage age was a lot lower, say around 15 for females (compared to about 25 now) and around 20 for males (compared to about 30 now), but now based on accuses like the natural right to have enough fun not to bear the great responsibility of a family very soon, the need for studying in university or earning money the marriage age has been risen and an attempt has been made to satisfy the natural desires with forbidden friendships during this gap, putting forward the friendship as one alternative to marriage in lower ages. This is due to the fact that we have practically approved a concept glued to the phrase "teenager" which translates this phrase as a period of time in each person's life during which the male or female has right to have fun, less to work and more to joy, be with friends, go to parks and cinema, travel and etc., while there is no such concept in Islam or any other religion, it can at most be linked to childhood and not to the teen-ages during which a youth has more energy and an stronger will and at the same time is sharper and full of ideas. One can both study-and-earn-money in this period and marry at the same time if he only sacrifices what is defined for him as teen-agery life, introducing it a natural (read it fake) human right!