Agostino Vallini was born in Poli, near Rome, but moved with his family to Barra, near Naples, as a child. He studied at the Major Archiepiscopal Seminary of Naples and the Pontifical Theological Seminary of Southern Italy, where he obtained his licentiate in theology. Vallini also attended the Pontifical Lateran University in Rome, earning his doctorate in canon and civil law with a dissertation on the new Code of Canon Law.
He was ordained to the priesthood by Bishop Vittorio Longo on 19 July 1964. He then taught canon law at his alma mater, the Theological Faculty of Southern Italy. From 1971 to 1978 he taught ecclesiastical law at the Pontifical Lateran University, while also serving as adviser for the Italian Catholic University Federation, the movement Seguimi, and the Union of Major Religious Superiors of Italy. He later became Rector of the Major Archiepiscopal Seminary of Naples and Regional Counselor of Catholic Action. On his return to Naples in 1978 he became rector of the major seminary until 1987, when he took up the post of dean of the S. Tommaso d'Aquino campus, where he had continued to teach.
On 23 March 1989, Vallini was appointed Auxiliary Bishop of Naples and Titular Bishop of Tortibulum by Pope John Paul II. He received his episcopal consecration on the following 13 May from Cardinal Michele Giordano, with Archbishops Luigi Diligenza and Antonio Ambrosanio serving as co-consecrators, in the Cathedral of Naples. Vallini was named Diocesan Bishop of Albano on 13 November 1999. On 27 May 2004, he was appointed Prefect of the Apostolic Signatura. As prefect of the Signatura, he served as the highest judicial authority beneath the Pope in the Church.
Upon the death of John Paul II on 2 April 2005, Vallini and all major Vatican officials, in accord with custom, automatically lost their positions. He was confirmed as Prefect of the Apostolic Signatura by Pope Benedict XVI on 21 April. Pope Benedict created him Cardinal-Deacon of S. Pier Damiani ai Monti di S. Paolo in the consistory of 24 March 2006.
Vallini was appointed Vicar General of His Holiness for the Diocese of Rome on 27 June 2008, succeeding Camillo Ruini. As Vicar General, he is responsible for the diocese of Rome on behalf of the pope. He is also Archpriest of the Lateran Basilica and Grand Chancellor of the Pontifical Lateran University.
In addition to his duties as Vicar General, Vallini serves as a member of the Congregation for the Causes of Saints; Congregation for Bishops; Congregation for Institutes of Consecrated Life and Societies of Apostolic Life; Congregation for the Evangelization of Peoples. He also serves as a member of the Pontifical Council for Legislative Texts and the Administration of the Patrimony of the Apostolic See and Council of Cardinals for Study of Organizational and Economic Affairs of the Holy See. He can hold these memberships until his 80th birthday.
On 18 September 2012, Vallini was named by Pope Benedict XVI to serve as one of the papally-appointed Synod Fathers of the 13th Ordinary General Assembly of the Synod of Bishops on the New Evangelization.
He was one of the cardinal electors who participated in the 2013 papal conclave that selected Pope Francis.
On 8 March 2014, Pope Francis named him one of the Cardinal Members of the newly established Council for Economic Affairs, which oversees the work of the Secretariat for the Economy, an agency with financial regulatory authority over all the departments of the Roman Curia.
On 26 March 2017 Pope Francis accepted his resignation as Vicar of Rome and Archpriest of St. John Lateran.
Distributing condoms in schools in the context of combating AIDS trivializes sexuality and education and must be fought by concerned parents, according to Vallini. In an official statement, he responded to a decision by the civil authorities of the province of Rome to allow the distribution of condoms from vending machines in high schools (see religion and AIDS).