First, choose a tree that is healthy and can support your weight. These will typically be six inches in diameter or greater, and living. Then, use a suspension system that can spread out the forces across the bark. A wide daisy-chain strap will be sufficient, but for more delicate trees you may choose to use a set of tree savers, which are straps that better pad and distribute these forces.
For the DIY types: tree savers can be improvised with strips of cardboard, or by using small sticks in between the strap and the tree. For the rest of us, Sea to Summit offers the Hammock Tree Protectors ($20).