They definitely climb trees! It's usually to escape a predator.
A neighbor growing up was messing around down at the creek and climbed a tree, unaware that a groundhog that heard him down in the creek had climbed the same tree to safety. Halfway up the tree the groundhog panicked and decided he was going to get out of there and came barreling down the tree at the neighbor boy. He was able to knock it out of the tree before he got to him.
I was able to get rid of one of the ground hogs in my barn because she climbed a tree. I was actually chasing after a squirrel that had been chewing on things in the barn. I ran out back with the rifle hoping to get a shot at it and heard a sound out in the weeds. I must've come out so quickly I cut the hog off from it's burrow. I just stopped and watched trying to figure out what was making the noise. Then I saw her climbing the tree...which gave me a shot I wouldn't have had otherwise.
They are somewhat clumsy climbers but their claws let them grip firmly so they can climb high if they feel threatened...