I'm reading about the Townshend Acts on Wikipedia, and it says that the American colonists rejected any taxation because it was unconstitutional. Were they referring to a specific document, like the Magna Carta?
They were referring to the unwritten constitution of the British Empire. Magna Carta was only a part of that. Without commenting on its legality, validity or morality, the argument was that Parliament could not extract money from the colonies without their consent. The constitutional principle involved being, of course, that of taxation without representation.
[The colonies] are the subjects of this kingdom, equally entitled with yourselves to all the natural rights of mankind and the peculiar privileges of Englishmen; equally bound by its laws, and equally participating in the constitution of this free country. The Americans are the sons, not the bastards, of England! Taxation is no part of the governing or legislative power. The taxes are a voluntary gift and grant of the Commons alone.
When, therefore, in this House we give and grant, we give and grant what is our own. But in an American tax, what do we do? “We, your majesty’s Commons for Great Britain, give and grant to your majesty”—what? Our own property! No! “We give and grant to your majesty” the property of your majesty’s Commons of America! It is an absurdity in terms.
- William Pitt, The Earl of Chatham,
It was generally agreed that that power was vested in Parliament to preside over all the disparate parts of the British Empire. Some colonists argued that this only meant Parliament had the right to regulate trade and commerce, in order to promote the common welfare of both Great Britain and her colonies. It was conceded that Parliament could impose duties for this purpose, just as fines could be imposed in order to uphold the king's peace.
I have looked over every statute relating to these colonies, from their first settlement to this time; and I find every one of them founded on this principle till the Stamp Act administration. All before are calculated to regulate trade and preserve or promote a mutually beneficial intercourse between the several constituent parts of the Empire; and though many of them imposed duties on trade, yet those duties were always imposed with design to restrain the commerce of one part, that was injurious to another, and thus to promote the general welfare ... Never did the British Parliament, till the period above mentioned, think of imposing duties in America for the purpose of raising a revenue.
- John Dickinson's Letter II from a Farmer in Pennsylvania
The charges of unconstitutionality was generated when Parliament began passing laws with an explicitly expressed intent to "raise revenue". This was interpreted as taxation without the justification of regulating the colonial trade, and consequently denounced by some (on both sides of the Atlantic) as unconstitutional. They believed, as William Pitts argued, that the gift and grant of colonial tax belonged to the colonial legislatures, rather than Westminister.
Short Answer: No, the colonists were not referring to a specific document. The colonists were referring to the fact that they believed it was beyond the powers of Parliament to tax them because the colonists did not have representation in Parliament.
Long Answer: The American colonists were not referring to a specific document like the Magna Carta, or any other document for that matter. It is important to remember that at this time the colonists still thought of themselves as part of the British empire. As such, the colonists were referring to the British concept of a constitution, unwritten as pointed out by Semaphore, where the Parliament had specific powers, and the people had certain rights. There are, however, historical documents like the Magna Carta that make up the British constitution.
The colonists would have been quite familiar with the British "constitution." As Bernard Bailyn put it, what was within the constitution was an "arrangement of governmental institutions, laws, and customs together with the principles and goals that animated them." (66-71). Bailyn quotes John Adams, who wrote a constitution of government is "a frame, a scheme, a system, a combination of powers for a certain end, namely, the good of the whole community." (68). Pauline Meir states in American Scripture: Making the Declaration of Independence that "Americans took particular pride in being governed under Britain's unwritten constitution, which they considered the most perfect form of government ever invented." (29).
The issue in the case of the Stamp Act and the Townshend Acts, was one of taxation without representation. The colonies did not have representatives in the Parliament. Up to the time of the Stamp Act the American colonies had been largely left alone by Parliament, meaning they had not been subject to internal taxes and left to govern their affairs largely on their own. This period was known as salutary neglect.
When the Stamp Act was passed it was the first major internal tax on the colonies, and as Walter Issacson points out Benjamin Franklin believed it "unwise, perhaps even unconstitutional, for Parliament to levy an internal tax on people who had no representation in that assembly." (222). Whether or not this was a correct interpretation is besides the point. The point is that the consensus in the colonies eventually became that the Parliament lacked the power to levy such taxes, because of the representation issue. As a commenter on the question noted in referring to a Constitutional History of the American Revolution: The Authority to Tax, the colonists believed that such powers could only be executed by their local officials, not by Parliament itself. (Reid 9-11).
In a way, the colonists concept of what was or wasn't constitutional is not that different from our present day idea of what is or isn't constitutional. Namely, is what the government doing within the powers possessed by the government, ie constitutional?