Hannibal Hamlin was a Protestant. Further research is needed in order to identify his specific denominational affiliation.
From: Political Graveyard website (http://politicalgraveyard.com/bio/hamlet-hammitt.html#R9M0IZA0O; viewed 28 November 2005):
Hamlin, Hannibal (1809-1891) - of Hampden, Penobscot County, Maine; Bangor, Penobscot County, Maine. Born in Paris, Oxford County, Maine, August 27, 1809. Brother of Elijah L. Hamlin; father of Hannibal Emery Hamlin. Republican. Member of Maine state house of representatives, 1836-40, 1847; Speaker of the Maine State House of Representatives, 1837, 1839-40; U.S. Representative from Maine 6th District, 1843-47; U.S. Senator from Maine, 1848-57, 1857-61, 1869-81; Governor of Maine, 1857; Vice President of the United States, 1861-65; candidate for Republican nomination for Vice President, 1864, 1868; U.S. Minister to Spain, 1881-82. Died in Bangor, Penobscot County, Maine, July 4, 1891. Interment at Mt. Hope Cemetery, Bangor, Maine. Hamlin County, S.Dak. is named for him...
Books about Hannibal Hamlin: Charles Eugene Hamlin, The Life and Times of Hannibal Hamlin (out of print); Mark Scroggins, Hannibal