A neighbor has the right to cut branches of a tree if they hang over the property line onto the neighbor's property. However, if that trimming damages the health of the tree, the neighbor could be held liable for the damage done.
A neighbor can't just trim the branches from a tree for no particular reason. The tree branches must prove to be a danger to the neighbor's property or to other people. For example, the branches could be rubbing onto the roof of the neighbor's home, or the branches could be hanging dangerously close to power lines. Also, if a storm damaged a branch and it is imminent that the branch may fall off soon, a neighbor can trim the branch back.