He was the eldest son of John Stokes of Athlone and Margaret Forster his wife. He was born on 28 December 1843 in Athlone, Ireland. He was educated at Galway grammar school, Queen's College, Galway, and at Trinity College, Dublin, where he graduated B.A. in 1864. He subsequently proceeded M.A. 1871, B.D. 1881, and D.D. 1886. In 1866, Stokes was ordained for the curacy of Dunkerrin in the diocese of Killaloe in the then established church of Ireland, and in the following year was appointed to the curacy of St. Patrick's, Newry. In 1868, he was nominated first vicar of the newly constituted charge of All Saints, Newtown Park, co. Dublin, which he held till his death. In 1893, he was elected by the chapter of St. Patrick's Cathedral, Dublin, to the prebend and canonry of St. Andrew.
Stokes early exhibited a taste for historical and antiquarian research, and from the first exhibited in its pursuit not merely an acuteness which was much beyond the ordinary, but a capacity for presenting the results of his investigations in a picturesque and striking form. From the date of his appointment to All Saints his leisure was devoted to these interests, which, however, were in his case almost invariably subordinated to the illumination of the ecclesiastical history of his own country. His gifts in this latter direction led to his selection by Dr. Reichel as his deputy in the chair of ecclesiastical history in the university of Dublin ; and in 1883, on the termination of his principal's period of office, Stokes was appointed his successor. The appointment was brilliantly justified, and it soon appeared that in selecting a professor the university had produced an historian. The fruit of his labours was quickly manifest in his Ireland and the Celtic Church, published in 1886, which achieved an immediate success. This was followed in 1888 by his Ireland and the Anglo-Norman Church, in which the history of Irish Christianity was traced through a further stage.
Stokes intended to continue the history of the Irish church down to modern times, but his scheme was interrupted by the laborious task of producing for the 'Expositor's Bible' his 'Commentary on the Acts of the Apostles' (1891). This work, which ranks among the most valuable contributions to the series in which it appeared, displays in a marked manner Stokes's literary talent. He succeeded in interesting lay people in the historical criticism of the New Testament, and in conveying to them the latest results of such criticism in a popular form.
From 1880 onwards, Stokes's indefatigable industry had enabled him to add largely, and in many directions, to the more important productions of his pen above enumerated. In 1887, he published, as the second volume of a Sketch of Universal History, a Sketch of Mediaeval History. In 1891, he published an edition of Bishop Pococke's Tour in Ireland. He was an occasional contributor on subjects connected with theology and ecclesiastical history to the Contemporary Review. Among his many articles in this periodical, that on Alexander Knox and the Oxford Movement is perhaps the most important (August 1887) ; and he produced numerous papers before the Royal Society of Antiquaries in Ireland, and the Royal Irish Academy. In 1887, he was appointed librarian of St. Patrick's Library, in Dublin, a position peculiarly congenial to his tastes. In spite of these varied labours he never neglected his clerical duties. In 1890, he was temporarily disabled by a partial stroke of paralysis, from the effects of which he never fully recovered. In 1896, he delivered a series of lectures entitled How to write a Parochial History, in which he strove to imbue his divinity students with something of his own enthusiasm for antiquarian learning ; and in the following year he commenced an instructive course of lectures on Great Irish Churchmen of the Seventeenth and Eighteenth Centuries, which he did not live to complete ; they were edited, under the title Some Worthies of the Irish Church (London, 1900), after his death by the Rev. H. J. Lawlor, who succeeded to his professorial chair.
On 24 March 1898, Stokes succumbed, after a brief struggle, to an attack of pneumonia. He was buried at Dean's Grange, co. Dublin.