John Locke’s thoughts on taxation can be found in his 1689 The Second Treatise of Civil Government. Simply put, Locke argued that there should be no taxation without representation. In other words, those who are taxed must also have access to political representation in the form of parliaments. This idea might sound familiar to those learned or steeped in American history, because it heavily influenced the political philosophies of the founding fathers.
Many have argued that Locke thought taxes should primarily be levied on landed wealth, meaning that they should be paid by wealthy landowners. These landowners, in turn, would either serve in or have a hand in electing parliament, meaning taxation with representation.
Much of this is rooted in Locke’s thoughts on absolute monarchy and private property. He thought that individuals had fundamental rights to life, liberty, and property and that it was the government’s job to uphold these rights. If we think about taxation and private property together, according to Locke, the government had to uphold and protect an individual’s fundamental right to property. Therefore, taxation had to occur with the consent of and in the interests of those being taxed. The only way to ensure those things was through taxation with representation.
Because the interests of an absolute monarch did not always align with the interests of those paying taxes and their right to private property, Locke saw this as taxation without representation, a violation of the individual’s fundamental right to life, liberty, and property. In other words, according to Locke, absolute monarchs should not have the legal right of taxing the populace.
One of the obvious questions that arises is, should those who have no access to political representation still pay taxes? I would recommend looking into that for further research. Lastly, it is useful to keep in mind that Locke's theories were complex and sometimes ambiguous, so there are a lot of varying interpretations of them. For further reading, I would recommend contextualizing John Locke by reading about his own history in order to better understand his writings and reading The Second Treatise of Civil Government.