Where does the law of conservation of momentum apply?

Momentum is conserved only if there is no net external force on the system.

Consider the snowball and the tree as the system. In your case, the earth provides an external force on the tree, so the momentum of the snowball/tree system is not conserved. If the tree is "suspended" (not attached to the ground) momentum would be conserved, but the final velocity of the tree would be very small and hardly noticeable due to its large mass.

If the system is taken to be the snowball, tree, and earth, momentum is conserved , but the final velocity of the tree and earth (assuming the tree stays attached to the earth) is infinitesimally small due to the very large mass of the earth.

Momentum of the body will be transferred to earth, let's exaggerate the numbers in your favor and assume your snowball is $10kg$ and you managed to throw it with $v_s = 200\frac{m}{s}$ where subscript "s" stands for snowball. Mass of the earth is approximately $5.97\cdot10^{24}kg$. For simplicity assume it was an elastic collision

$$m_sv_s = m_ev_e$$

where "e" stands for the earth. If you plug the numbers in, thus you get

$$v_e \approx 3.3\cdot10^{-22}\frac{m}{s}$$

The tree is attached to the earth. The momentum from the snowball is transferred to the tree and then distributed troughout the whole earth. Because a tree is a solid object this transfer happens almost instantaneously. The earth is so large that this tiny amount of momentum won't be noticable at all.