Massachusetts is the most Catholic state in the US, with 44% of its citizens being Catholics. How did a state that was founded by and was a haven for Protestants come to be the most Catholic state?
Not to discourage other answers, but you might be interested in this thread, with an answer by /u/Commustar. The specific question there was about how Boston became so heavily Irish, but /u/commustar also speaks on the religion of Irish immigrants coming to Boston. Considering that the seat of Massachusetts' government is in Boston, and also how historically Catholic the Irish are, it's pretty illuminating.
In addition to the post about Irish migration into Boston /u/JosephWilliamNamath linked, I'd point out that there were several other predominately Catholic nationalities that immigrated to Massachusetts for a variety of reasons over the last 200 years or so.
Massachusetts has a large Portuguese population in Fall River and Cape Cod drawn initially by the whaling industry and later by the fishing industry.
French Canadians were drawn in large numbers to the textile mill towns of Holyoke, Lowell Worcester and Fall River after the Civil War. Of course, French Canadian migration was a phenomenon that reached all of the New England region
Italian immigration into Boston's North End began in the 1860s, most likely as refugees from the wars of Italian migration. However, mirroring the larger trend of Italian immigration to America, major immigration to Boston started 1890s and continued into the early 1900s primarily from southern Italians fleeing grinding poverty at home. The reason for Italians settling in Boston specifically is similar to the case laid out for the Irish before them. Being a port city, Boston was the first stop in America for some of the boats coming from Italy. As migration progressed, and communities grew, Boston Italians would bring family members over from Italy.
In this same period, there were also many Polish immigrants fleeing poverty and Russian persecution in the 1880 to early 1900s who were drawn to farming opportunities in western Massachusetts in the Connecticut river valley
Finally, most recently, Massachusetts has seen populations of Puerto Ricans, Dominicans, and other Latin American and Caribbean communities arrive in the large cities like Boston, Worcester and Springfield, but also in the old mill towns of Lowell, Lynnn, Saugus, Holyoke, Fitchburg, etc. As is becoming a theme, these communities came to Massachusetts initially to pursue better economic opportunity than was available in Puerto Rico or Dominican Republic, or else to escape civil war or violence Honduras, Nicaragua and Guatemala. As communities became established, relatives and friends from Latin America would also arrive where a network of friends already existed.
Of course, there was immigration to Massachusetts from non-catholic communities. In the same era as Poles and Italians were arriving, Finns were arriving in Fitchburg. More recently, Massachusetts has had immigration from Southeast Asia, and Worcester hosts one of the larger Ghanaian communities in the US.
But, essentially the answer is that Massachusetts has seen lots of immigration from Catholic countries in the 19th century and again in the late-20th century.