Being rodents, squirrels have huge olfactory bulbs, which they use to sniff out bulbs and other delicacies growing in your garden. It's very quick and easy to toss a little pepper on the flower bed. The next time Mr. Squirrel comes sniffing to see what you've planted for supper, he'll get a nose full of pepper in his exquisitely sensitive little rodent nose and leave you alone. The downside is that you have to reapply it after each rain. As for the trees, you might consider getting in touch with your inner Bull Conner and pulling out the garden hose.
I have this stuff called “critter ridder” which is basically extract of cayenne peppers.
Moles and stuff tend to not like it when they get it in their beady little eyeballs!