Generally, there are two groupings of gardening-specific stretches and strengtheners*; the first set is to help build your base, which means you can perform the stretches either prior to gardening or on a non-gardening day.
The second group is for helping the muscles recover after a gardening or yard work session, so it's best to perform them soon after you finish cleaning up.
Base-building Stretches and Strengtheners for Gardening:
Strengthens the thigh, stretches the groin, and gives stability and protection to the knee and hip.
Promotes flexibility to the shoulders, ankle and hip, stretches and alleviates tension in the neck and upper body, strengthens the core, thigh, and inner thigh muscles, helps to improve balance.
Strengthens the shoulders and core muscles to give support to the low back, especially when performed with proper form: neutral spine alignment, and "pulling" the belly button "up" towards the spine.
Strengthens the muscles along the waist and low back, elongates the spine, alleviates the constant pressure caused by forward/back positions.
Opens up the whole front of the body after long periods of being "hunched" or bent over. Instantly stretches and relieves tight thighs and a stiff low back and chest.
It's generally best to hold each stretch for about 30 seconds, sometimes a bit longer if the muscle is particularly tight, all the while breathing smoothly and concentrating on relaxing the targeted muscle group.