There is no ideal age for marriage as such. However, as per Government of India, minimum age for girls is 18 years and for boys it is 21 years and it is actually based on body's complete biological development. Girls develop relatively early when compared to boys and hence the age difference. Yes, minimum age is been told but not the maximum age, as there isn't any maximum age. One can marry as old and as late as per one's desire.
Our society has fixed certain rules as per their beliefs. By certain age, it feels education should be completed and by another certain age, it expects an individual to settle down in his personal life too by getting married as now he/she is capable of securing their life partner as well as can think of having a family. Society or its members just go by numbers. According to them, marriage is an age related practice. By certain age, one should get married and have kids. If one has started earning big nice paycheck then he should get married. However, nobody understands that age or money does not mature an individual. Age may bring wrinkles on face and give a matured look physically. Money may make someone prosper and progress but whether this prosperity and maturity is enough for that person to deal with a relationship like marriage.
Marriage requires mental maturity. There can never be an age-group which can be called as perfect to get married. Some individual may mature early may be in 20's or even when he is in his teens understanding the importance of marriage and is ready to deal with all such sorts of responsibilities. Others even after crossing 40's or even in 50's cannot become matured enough so that they can deal with it. This is why we see so many break ups and marriage ending in a split up or divorces. If two individuals married at right age and have ticked all the boxes essential for a person to get married then why did they end up being miserable. Even those who do not end up being divorced and are still living together yet apart and it may be for their kids or for society aren't really happy anyways.
Marriage is about dealing with it. One has to get married when an individual finds himself a real nice partner who can touch soul. Irrespective of whether they are introduced through friends, family or one finds them by oneself, he/she has to be perfect for them. A perfect match no matter how old we get will always appear perfect and a bad match becomes still terrible with time. Don't worry about the passing time. Society always tries to scare us by saying that with passing times, we will find difficulty in finding a match for us. It may be true but then what is the use of such marriage which was done at right time but still has ended very terribly.
Next requirement for marriage is understanding about what actually this kind of collaboration requires. It is just not about financially securing your better half and meeting requirements but is about a complete change in thinking process. Before marriage it is 'me'. But after marriage it becomes 'we'. If one has become matured enough to deal with 'we' instead of been selfish 'me' then it it the time when he/she should tie a knot. Marriage brings with it a whole set of responsibilities. If one is ready to fulfill them not just for the sake of doing so cause every one around is doing and consider it as burden, instead if they are ready to fulfill them with the joy of doing, only then they should get married.
If we delay our marriage by certain years because we have not found ourselves right partner or we have yet not gained that maturity to deal with its complexities, we may get questioned and cornered by society as they feel that we are odd man out. However, it is their perspective. Marry only when you want to. There is no right age and there is no maximum age limit. One can get married even while he is breathing his last. Dreadful years of married life is much miserable than being alone. There is no hard and fast rule, in fact there are no rules and regulations regarding marriage. We observe others and try to imitate them. Instead of doing so, we have to decide it as per our convenience.