You shall not plant…any tree near the altar of God… (Deuteronomy 16:21)
We love trees. There’s a prohibition against razing fruit trees in war (Mitzvah #529). There’s a whole holiday dedicated to trees. And yet, we are not allowed to plant any trees in the Temple. That’s because trees were commonly used in this way by idolators. Since an idol’s temple commonly included trees, we want to do the opposite to make it clear that the Beis HaMikdash is not like a house of idolatry.
As a preventive measure, the rabbis forbade wooden structures in the Temple. While these would have been built rather than planted, the word ‘eitz” in Hebrew means both “tree” and “wood,” so it was probably a good idea to play it safe.
This mitzvah applies to both men and women. Even today, it would be prohibited to plant a tree on the Temple mount in a place where the Sanctuary would have stood. (To be on the safe side, maybe you shouldn’t plant any trees anywhere on the Temple mount. You know, just in case.)
This prohibition is discussed in the Talmud in tractate Avodah Zarah on page 45a-b. It is codified in the Shulchan Aruch in Yoreh Deah 145. This mitzvah is #13 of the 365 negative mitzvos in the Rambam’s Sefer HaMitzvos.