Every spring, summer and fall and see an influx of garden injuries in my Columbus pain relief clinic. Much if what I see is preventable. One of the main reasons I see them, is because of bending over from a standing position. This can be problematic, especially if you have large gardens and plant a lot of vegetables. Even with small flower gardens, this can still aggravate the back, no matter what your lifestyle is like. You cannot out exercise bad body mechanics. With that being said, proper body mechanics alone are not always enough, so lifestyle is important in addition to proper body mechanics.
One way to address the lifestyle issue is this. I am not a fitness expert and am not passing this off as advice, only stating what I do. Certain things I have noticed about my body through trial and error. I do my best with a strong core and loose hips. I workout regularly and I have noticed that the more I sweat through working out, the less heat sensitive I am overall, so I am less affected by the heat during outdoor activities such as gardening, hiking, etc. I still have to be safe about it. My exercise routine is a little shorter in the summer time, despite having air conditioning, since that is what is safe for my body. Safety first, always. In order to keep my hips loose, I like the gentle styles of yoga that include a lot of deep hip stretches. I feel like that helps to counter how tight they get during cardio and strength training.
Now, on to body mechanics. Bending over from a standing position while gardening is a recipe for disaster and can injure your back. I always recommend that clients get a stool for kneeling and sitting. I like the kind that offers both options and has sleeves in it to hold your garden tools.