Although the Sages exempt an entrance into a garden,[1] many contemporary authorities note that this would only apply to gardens used exclusively for growing fruits and vegetables and not for human habitat. In contrast, our gardens are multi-faceted recreational areas, often used for eating and other domestic purposes.
Consequently, your garden would be defined as a “courtyard,” which needs a mezuzah even though it is not a room. Your back door, then, is an entrance to this courtyard, and you should affix the mezuzah on the right as you go out to the garden.[2]
[1] Menachos 33b; Agur B’ohalecha 37:8.
[2] Sha’arei HaMezuzah 2:35; Chovas HaDar 2:13:25; Aruch HaShulchan Y.D. 286:4. These authorities hold that the informal activities that commonly take place in our gardens qualify them as courtyards. Cf. Chazon Ish (Y.D. 168:6) and Agur B’ohalecha (37:8-9), who argue that a true courtyard is a place where intensive domestic activity takes place. Hence, they maintain that the mezuzah should be placed on the right hand of one going into the house.