There are a number of challenges facing urban food production and these range from homeowners associations to zoning laws, to practical issues like time inputs. Finally the foods we normally prefer to eat are of questionable sustainability. Our culture sees home gardening as a hobby and something which provides at best a small supplement to commercially grown foods. This means if you start growing cabbages and tomatoes in your front yard, neighbors may complain, and there have been people fined for zoning law violations for growing too many vegetables in their city lots.
There are, of course, alternatives which can match the constraints but understanding the constraints are necessary first.
I want to also expand on the question of sustainability of current preferences regarding vegetables. We mostly eat annuals in this role, and they mostly fall into the ecological role of "pioneer species" in fertile areas, which prefer to grow on disturbed fertile soil, and help prepare the soil for the next wave of plants. However, perpetually disturbing the soil has significant costs fertility-wise which is why chemical fertilizers (usually made from fossil fuels) are necessary. This isn't to say we should abandon lettuce, tomatoes, and cabbage, but it is to say that we may want to be more careful about where and how much of these we grow and consume. Alternative, perennial vegetables are more sustainable when grown right and they deserve much more space than we give them.
Western culture used to eat a fair number of perennial veggies (and we still eat a few like asparagus) but these have frequently fallen by the wayside, which is a shame sustainability-wise.
Usefulness in Sustainability
I totally agree that done right, urban food production is an important aspect of sustainability. It is unlikely to mean that cities are self-sufficient, food-wise, but it does mean that fewer energy inputs are required because less food has to move at all.
But in addition I am in particular a fan of urban permaculture because this provides higher yields with fewer inputs, and it provides general sustainability training of a sort that is otherwise quite irreplaceable (see my proposed answer to the connection of permaculture and sustainability).
Historical Interlude: Victory Gardens
In WWII, one interesting aspect of the war effort was the promotion of victory gardens by the White House as a matter of easing pressure on domestic food sources brought on both by the war effort and the internment of Japanese-American farmers. By the end of the war it was estimated that around half of the produce grown in the United States was grown in private lots and city parks. So while this does not necessarily lead to self-sufficiency regarding food in cities, it certainly helps reduce the burdens on transportation and fossil-fueled agribusiness.
Some thoughts on urban permaculture
One aspect of my own gardens at the house in Chelan, WA is that a lot of garden space is actually multi-purposed. I have many flowers which produce edible tubers, or are useful in herbal medicine, or even produce edible fruit. I intend to extend my "flower gardens" to include blueberry patches, and I can already go most of the summer without buying fruit (ornamental plums, freestone peaches, grapes, strawberries, blackberries). The gardens themselves utilize very few inputs and many don't even get weeded more than once a year if that.
However you can't look at the flower gardens from a distance and see that they are anything other than ornamental. The gardens look like flower gardens which keeps many neighbors happy and there are some small vegetable gardens (and I also add container gardens) in places where they are helpful.
Part of the use as you say is trying to use "all my yard" for something. If I have to mow the lawn and I am not using it, it does me no good. I am even thinking about putting beehives on the roof...