It is narrated from Sayyiduna Anas (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) entered the garden of an Ansari woman named Umm Mubashshir (may Allah be pleased with her). He (peace and blessings be upon him) asked: "Is this the planting of a Muslim or of a disbeliever?" They said: Of a Muslim. He (peace and blessings be upon him) said: "Any Muslim who plants (a tree), and a human being, a bird or an animal eats from it, it becomes a charity for him."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب المزارعة / 11748