From The Gospel of Matthew, by Curtis Mitch and Edward Sri, commenting on Matthew 22:15-21
The trap comes in the form of a question: Is it lawful to pay the census tax to Caesar or not? The Pharisees are trying to force Jesus into a dilemma. By giving him only two options for an answer, they hope to back him into one of two predicaments.
If Jesus affirms the propriety of the tax, he will come off as a Roman sympathizer, discrediting himself in the eyes of numerous Jews for whom the Roman rule of Judea was an intolerable burden. On the other hand, if Jesus forbids paying the tax, the Herodians are sure to report him to Roman authorities for instigating a tax revolt. The last time a charismatic Galilean led a tax revolt in Palestine the Romans responded with appallingly brutal force.
Immediately Jesus detects their malice and knows that they are testing him. So he asks them to show him the coin that pays the census tax. Little did they realize what was happening. By producing the coin used for the tax, the Pharisees are publicly exposed as hypocrites. They may oppose Roman taxation in principle, but apparently they are in the habit of paying it just like every other Palestinian Jew
….Instead of walking into the trap, Jesus slips through it, taking advantage of the situation to make an important point. He says, Then repay to Caesar what belongs to Caesar and to God what belongs to God. Just as Jesus exposed his questioners as hypocrites, so now he exposes their question as a false dilemma. He is saying that political and religious obligations can both be legitimately met. Paying taxes is not a compromise of one’s duties toward God, nor does serving God exempt one from supporting the civil government.