There's some difference, I guess. In the first case the meaning is that Tom acted well with regard to someone, but he himself might either like doing that or not. It's just the fact that his deed was nice.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
CliveIt was nice of Tom to do that. (1) Tom did it.Yes, and as a result (1) and (2) are not fully equivalent.
It was nice for Tom to do that.(2) Either Tom did it or possibly it was done by someone else for Tom.