Tom Bombadil had power over Old Man Willow, and checked the evil in him as much as he could, or was willing to.
In The Fellowship of the Ring book, Old Man Willow casts a spell on the hobbits (Frodo, Sam, Merry and Pippin), causing them to feel sleepy. Merry and Pippin lean against his trunk and fall asleep, while Frodo sits on a root to dangle his feet in the water, before also falling asleep. The ill spirit then traps Merry and Pippin in the folds of its trunk. Sam and Frodo attempt to burn Old Man Willow in order to release their friends, but Old Man Willow communicates to Merry, who is still inside his roots, that if the burning does not cease, the hobbits would be squeezed in two. They are saved by the timely arrival of Tom Bombadil, who 'sings' the ancient tree to sleep. Whether or not Old Man Willow is truly evil remains a mystery. It is possible that he represents the anger and bitterness of nature toward those who try to destroy it.
Portrayals in adaptations
Although this scene did not appear in the 2001 movie adaptation, a very similar episode was included in the extended DVD edition of the 2002 second film where Merry and Pippin are attacked by a Huorn in Fangorn forest. In this interpretation Treebeard speaks Tom Bombadil’s lines.