A few months ago I wrote about dumpster diving for food. In that post, I also mentioned the relative economic payout of other scavenging-type activities you can do in your free time. I forgot to mention gardening though.
Here is a pretty comprehensive article on the economics of starting a vegetable garden in your back yard. It gives a lot of good advice, like recommending to focus on high-value, rare, low-space crops like special variety green beans, herbs, and tomatoes, as opposed to things like bulk potatoes, onions, carrots, melons, and sweet corn that take up a lot of space and would be better (and more cheaply) obtained at a farmer market, especially in high season. I would add one other factor that especially comes into my consideration here in the developing world: pesticide residues. In the tropics, ertain crops like spinach, lettuce, strawberries, potatoes, and green beans receive a lot of pesticide, and they can get expensive if you buy them organic (here is a listing from the Environmental Working Group on the foods that tend to have the highest pesticide residues in the US). These are the type of crops that I also tend to grow myself when I can in the tropics, to avoid subjecting my family to agrochemicals. On the other hand, things like melons or sweet corn, even if they get sprayed a lot, you can peel and thus avoid a lot of the residue, while peppers and tomatoes you can wash easily with soap and water.
The bottom line from the article is that you may be able to save a little bit of cash by growing your own crops (and if you're tending them using time that you wouldn't be able to use earning more money), especially after a first-year outlay for tools. But almost any such analysis I've seen concurs on that point that, more than the often-meager cash savings, the best reasons to garden are to get ultra-fresh, agrochemical-free food, produced in a low-carbon way that gives you a lot of exercise and pride. Hence the health and wellbeing benefits are far more compelling than the money savings.