A pony is defined by size, not age. Specifically, a pony is a small horse measuring less than 14.2 hands high (about 58 inches).
There is no specific birthday at which a horse becomes a pony, but most ponies reach full physical maturity by around five years old.