Irving almost certainly drew a lot of inspiration from the "Faust" storyline, which parallels "The Devil and Tom Walker" in many ways, including the moral lesson. Irving appears to have intended to simply retell the Faust story with more American elements woven into it. We might also contextualize the story in its historical place - Irving was struggling for inspiration to write a follow-up to his previous, successful collection of stories, and the collection in which "The Devil and Tom Walker" appeared was criticized for being too derivative and not representative of Irving's full creative power.
Like the Faust story, in which a man sells his soul to the Devil in exchange for material power, Tom's story is a fairly straightforward and simple one. Any reader may discern that Tom will come to regret his bargain in time and attempt to cheat his way out of it, or simply perceive that bargaining one's soul is a poor trade, but that immediate gratification is a powerful lure. Either way, Tom's story has little of the complexity that later versions of Faust portrayed, such as Faust being forgiven for his transgressions because of the purity of his intent. Tom, on the other hand, is simply a horrible person, and the story acts more as a fable; do not allow material wealth and power to blind you, because these things are fleeting and rarely bring both happiness and wholesome living. Likewise, in keeping with some of the Gothic themes of the story, Irving suggests that one take things at face value; a dark, evil-seeming place or person is almost certainly so.