Vegetable gardening is a hobby. Having some fresh vegetables to enjoy when they are in season and to share with your friends is swell, but ultimately you are going to end up buying more stuff that you don't need to buy to pursue the past time. Home Depot, Lowe's, and other garden supply stores in early Spring are madhouses on weekends for exactly that reason. There's also the issue of water, which you will use more of as well. It's all a matter of scale, and backyard and container gardening won't scale up to make a meaningful difference in your carbon fooprint. CSAs are great, but someone is driving your ugly vegetables around so you can get them, and it's not in a tractor trailer.
That complicated and quite ingeneous capitalist agriculture, processing, distribution, and retail system that literally puts food on your table can't be replaced. Gardening can only make you a few salads and a couple of jars of spaghetti sauce, and that is very nice, but your grocery bill is not going down substantially unless growing food is all you are doing.