At the end of "The Devil and Tom Walker," as Tom has vanished, apparently taken by Old Scratch, the narrator warns "all gripping money-brokers" to "lay this story to heart." This is the most important theme of the story. Both Tom and his wife are portrayed as miserly people, obsessed with material gain to the point that they hid money and even freshly-laid eggs from each other. Tom does actually reject the devil's first offer, primarily because Old Scratch demanded that the money be invested in slave trading (a none-too-subtle critique of the institution of slavery), but his wife immediately tries to deal with the devil herself.
Once he has bargained with the Devil, Tom becomes a merciless moneylender, gouging poor Bostonians in a time of economic depression and a general shortage of currency. He is a usurer, one of the Devil's "peculiar people." He becomes rich and prominent, but eventually begins to despair that the Devil may in fact collect his due. This is why he attends church, though even that is an act of cheating. He becomes a zealous and highly judgmental churchgoer, one who views the sins of others as "a credit on his own side of the page." His Christianity, in short, is highly selfish, and "his zeal became as notorious as his riches."
Of course, this story has much to say about fake morality, but its main theme, that of greed, might be best understood in light of its context. America in the 1820s was in the early stages of what has been called a "market revolution," a rapid change to market capitalism that fundamentally altered traditional economic and social relationships. Though Irving was in Europe while writing this story, he had experienced these wrenching economic changes firsthand, as his family business was ruined. Irving and many other intellectuals—the transcendentalists of the following decades would take up similar themes—bemoaned what they saw as a grasping, overly materialistic culture emerging in the new United States. "The Devil and Tom Walker" is entirely consistent with these concerns.
The story "The Devil and Tom Walker" by Washington Irving has a strongly religious theme concerning the nature of greed. In the beginning of the story, Tom Walker makes a Faustian bargain with the Devil, exchanging his soul for wealth. Both Tom and his wife are portrayed as greedy by nature. Rather than the Devil needing to actively seduce Tom and his wife, their greed makes them basically volunteer their souls to him, a plot element that suggest a more general point about what avarice and covetousness do to the human soul.
After Tom has sold his soul, he becomes a money lender. Despite his wealth, he is still cruel and avaricious, even refusing to feed his horses properly to save a few pennies. Although he outwardly attends church services and carries a Bible, inwardly, he lacks Christian charity. This introduces a second theme, that it is not, for Irving, the outward ceremonies that make someone a true Christian, but an inward spirit. When the Devil claims his soul, in a sense it is not so much that the Devil is purely an external force for evil, but rather that in his greed and cruelty Tom had fully given himself over to the Devil.