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.
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.
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?