Why is Captain Kidd mentioned in "The Devil and Tom Walker"?
Captain Kidd, a real-life privateer and pirate who was well known in the New England colonies, is mentioned for practical and (probably) metaphorical reasons in this story.
The main reason for his mention is that Kidd is the person responsible for burying the treasure, which is what the Devil uses to bargain with Tom, in essence setting the foundation for the rest of the story. However, the treasure, and Kidd's involvement, are what is sometimes called a macguffin - a thing which drives the action of the story but is itself relatively unimportant. Kidd and the treasure itself are not inherently important; it's what they drive people to do that matters.
Metaphorically, connecting the treasure to Kidd may carry a moral message, in that the treasure was "ill-gotten", or stolen, which some might consider to be a sign that its value is compromised by the methods used to acquire it, and that it would be better to leave it alone. This also helps to taint the otherwise impersonal nature of money, affording the lesson that it's not so much money itself that is the problem, but this particular fortune.