Under most circumstances, the fruit that grows on a tree belongs to the owner of the tree. If a tree branch containing fruit hangs over the property line between two neighbors, the neighbor of the tree's owner does not have the right to pick it. She may trim the branch back to the property line, but the tree owner retains the right to the fruit.
Fruit trees that grow on public land are open to the public. People have the right to pick this fruit, regardless of whether the tree belongs to them or not. If the tree rests on private property but the fruit hangs over into public land, residents can legally pick it.
Some people assume that if fruit falls from a neighbor's tree and lands on their property, they have the legal right to eat it. This is not always the case. Without the tree owner's consent, the fruit must be returned and cannot be consumed.