In Pokémon Gold & Silver, there was a new mechanic which allowed you to use Headbutt on the trees. In Diamond & Pearl, this is not brought back, however there are a few new things you can do with certain trees:

Sweet Honey

The item that you use for this is the Sweet Honey. Finding it in the Floaroma Flower Field above Floaroma town, you can purchase it off of the first guy you see for 100 Pokédollars. You are also capable of finding them using Combee's Special Ability.

Since you're able to buy an infinite amount of these, you should go around and stock up on them so that you can get it on as many trees as you possibly can

The Trees

All around Sinnoh, you will see trees different to the regular trees. These trees are brown. With these trees, you are capable of spreading Honey on them.

Simply go up to them and press A to spread the honey on them. This will not do anything right away, but if you come back to the tree in approximately 12 hours, a Pokémon will appear. There are a number of Pokémon that do appear on the trees, many of them exclusive to the this method, however the more common Pokémon to this method are Wurmple & Silcoon/Cascoon. This will throw a spanner in the works for finding certain Pokémon, there is also the fact that if you wait too long, the Pokémon will be gone and your sweet honey will be wasted.

Below are the Pokémon that can only be found through the Sweet Honey on trees:

Aipom Heracross Burmy
Combee Cherubi Munchlax