The most obvious lessons come from the fact that Tom, even though he has all of the money in the world, is miserable and unliked. We can learn that money does not buy happiness. So many of us spend our lives striving to get more money and attain riches, but this fable-like tale expresses the very true sentiment that money does not bring happiness or lasting peace. It is only in meaningful relationships and in helping others that really brings happiness. That is the main point of this entire story.
Also, to get money, many of us will lose our morals and values along the way, which is the symbolic equivalent of literally selling your soul to the devil. Tom sold his soul, just as many people lie, cheat, steal and manipulate their way into money. You lose your integrity, honesty and decency, and it's not worth it. Being rich is not worth stepping on other people and giving up principled behavior. That is another lesson that we can take away from this story.
Other lessons can tie into Tom's perspective of things: he wanted money more than anything else in the moment, but years later after he got it, he would have given anything to give the money back. Sometimes, we think that we want something so badly in the moment, and will do anything to get it; what we don't realize is that decisions made with such intense desire often come loaded with regret later on. Making wise decisions that are based so strongly in intense desires is a more prudent choice, and will lead to less regret later on.
Those are just a few lessons that we can take away from this tale; I hope that helped. Good luck!