Quakerism began in the late 1640s, a period of flux in British society following a civil war. For the first time, a crowned British monarch, Charles I, had been executed. This led many dissenting religious groups, including the newly-formed Quakers, to believe they were living in the end times, after which God himself would come to rule his people and usher in the New Jerusalem. Quakers wanted to prepare for this imminent Second Coming, and they also felt they no longer needed a priesthood to connect them to God.
Even under the fairly sympathetic regime of Oliver Cromwell, the Quakers faced significant persecution, which included beatings, imprisonment, and seizure of property. After the Restoration, when the monarchy came back to the throne, the persecution became more severe. Quakers were increasingly fined, imprisoned, and sometimes killed for their religious beliefs.
From the point of view of the monarchy, their beliefs and organization undermined the state. For example, Quakers refused to pay the required tithes or taxes to the Church of England because they rejected the legitimacy of that church. Since this was the church that had anointed the king, this behavior was, not unreasonably, held to be potentially treasonous. Quakers also refused to attend Church of England services, to swear oaths, or to show proper deference to social superiors, such as by removing their hats in courts of law. They also illegally assembled for their worship, which was forbidden after the Restoration.
In England, the Quakers set themselves apart as a "peculiar" people, adopted simple lifestyles so as to free up resources to help the poor, and kept a "hedge" around their group so it would not be corrupted by outside society. Quakers rejected most of the arts and refused to allow individuals to marry outside of the group. By the end of the century, they had adopted their distinctive style of plain dress.
The Quakers were glad to avoid persecution by emigrating to the colony of Pennsylvania, established by Quaker William Penn in the late seventeenth century. Penn, being acutely aware of the suffering caused by religious intolerance, made sure that Pennsylvania safeguarded freedom of religion for all faith groups. This way of thinking influenced the eventual separation of church and state in the United States Constitution.