He was accused of being a Papist because he had been supporting James II's Declaration of Indulgence which "suspended all penal laws in matters ecclesiastical for not attending the established Church of England or not receiving communion according to its rites; permitted people to worship other than in the established Church of England either in private houses or in chapels; ended the requirement that people take various religious oaths before advancement to civil or military office." (as summarized on The Jacobite Heritage site.)
This Declaration would have applied to Catholics, all Protestant dissenters, including Quakers, and Jews. Penn went on preaching tour while visiting England to support James II's efforts. The Glorious Revolution of 1688 and the Toleration Act of 1689 made those actions traitorous; Penn was imprisoned and lost all his lands to the Crown. He was eventually freed and spent many years in England involved in court cases against an embezzling agent.
Theologically, of course, Penn was not a Catholic. Indeed, he denied the central doctrine of Christianity, the Trinity, and was imprisoned in the Tower of London for this denial in 1668 and 1669. But in Anglican terms at that time, being a Quaker was as bad as being a Papist, and Penn was even called a "Jesuit"!