Originally there was no age requirements mentioned when Joseph Smith and Oliver Cowdery received the Aaronic Priesthood on May 15, 1829.1 Doctrine and Covenants also do not mention a specific age.2 It was a custom early on in the church to generally only ordain adult males, only allowing a small number of youths, but there was no specific doctrine or regulation.4
The first age requirements came about in 1909. At the request of President Joseph F. Smith a General Priesthood Committee was organized in 1906 (which lasted until 1922) to prepare lesson outlines for the various quorums.
The committee initially included Rudger Clawson and David O. Mckay of
the Council of the twelve, plus Charles W. Nibley, Orrin P. Miller, and
David A. Smith of the Presiding Bishopric. It was soon enlarged to nearly
twenty members, half of whom brought with them valuable experience
as general board member of the Sunday school, the YMMIA(Young Men's Mutual Improvement Association...eliminated 1974), and religion
classes.
...
But before appropriate lessons could be written for each quorum, the
Committee found it necessary to establish age groupings for the lesser
priesthood. After 1877 it had been customary in the Church for boys at age
twelve to be ordained deacons. But standard age practices for ordaining
teachers or priests, or for advancing young men through the priesthood
were lacking. The Committee therefore suggested specific ages at which
specific Aaronic Priesthood ordinations should occur. Bishops were then
instructed by the Presiding Bishopric to advance boys when worthy,
and unless there are special reasons to the contrary they should be advanced
in the priesthood from deacon to teacher and from teacher to priest. There
can be no set age when persons should be ordained to the various offices in
the Aaronic Priesthood, but we suggest that as near as circumstances will permit
boys be ordained as follows: Deacons at twelve, Teachers at fifteen and
Priests at eighteen years of age.3
Further age changes can be seen through 1970 where they have remained unchanged to present.4
Table 1
Changes in Age of Ordination, 1908-70
Year Deacon Teacher Priest Elder
1908 12 15 18 21
1925 12 15 17 20
1934 12 15 17 19
1953 12 15 17 20
1954 12 14 16 20
1960 12 14 16 19
1970 12 14 16 18
--EDIT--
A slight change in age requirements starting in January 2019. This will allow someone to be ordained potentially up to eleven months earlier than they would have normally been ordained.
In addition, young men will be eligible for ordination to the appropriate priesthood office in January of the year they turn 12, 14, and 16.5
1 https://www.lds.org/scriptures/pgp/js-h/1.68-73?lang=eng#p67 and https://www.lds.org/scriptures/dc-testament/dc/13?lang=eng
2 https://www.lds.org/scriptures/dc-testament/dc/84 and https://www.lds.org/scriptures/dc-testament/dc/107
3 The Priesthood Reform
Movement, 1908–1922
https://byustudies.byu.edu/file/1889/download?token=iei-ow_X (pdf download)
4 From Men to Boys: LDS Aaronic Priesthood Offices, 1829-1996 https://www.jstor.org/stable/23287418 or https://digitalcommons.usu.edu/cgi/viewcontent.cgi?article=1026&context=mormonhistory
5 https://www.mormonnewsroom.org/multimedia/file/age-group-announcement-january-2019.pdf