The answer to that is both Yes and No.
In an ideal world, we would all simply go to the garden when everything we need is ripe and at the peak of freshness and nutrition, and pluck it off the tree, vine or out of the ground. In that case, fresh would be the healthiest and the tastiest. And in some cases, there are those of us who do. But for most for us who live in a world of supermarkets and uber-grocery stores and we cannot afford that luxury.
In that case we have a few alternatives. One is that we can purchase "fresh" produce, either commercially or organically grown at the local supermarket. In this case, the produce (unless locally grown, which is the exception to this rule) has often been grown on large-scale farms, picked green, shipped over great distances (over state and county lines), artificially ripened before displaying on the produce rack and then put out for display. The items in question have most often been shipped green in order to prevent costly loss due to spoilage, since shipping takes time and ripe vegetables bruise easily and spoil quickly when handled improperly. Chances are also good that the produce has been treated with chemicals to prevent spoilage and infestation, blight, pests and what have you. Chances are also good that the vegetables have been grown using some form of chemical enhancement or genetic manipulation of some kind: the US produce industry has been doing that for years. Organic produce is an exception to this practice also, generally speaking.
Farmer's market display locally grown produce, in which case the vegetables are picked when fresh and put out for display. The nature of growth enhancement or chemical pesticide use might be he same as the above example, but in most cases the produce is picked when nearly ripe rather than green. Organic produce generally uses neither, although "organic" can still be grown using more natural varieties of pesticides, and may or may not be locally grown: in which case the vegetables are still picked green prior to shipping.
Canned vegetables are always picked at the peek of freshness and ripeness before canning, at which time the produce is treated and then packaged. This can result in a strange paradigm: that of having a canned vegetable that is technically riper than a fresh vegetable, and possible healthier and better tasting. This is generally not something that is widely known nor understood, nor is the fresh produce industry hollering about it. Having been a chef and in the restaurant industry for nearly three decades, this is simply a fact that one accepts. But as a consumer, it presents an interesting conundrum.
Would that we all still living in the garden as was originally intended.
In any case, there is nothing bad about getting fresh produce, or canned or frozen for that matter; provided you are aware of just what it is you are getting and how the vegetables have been treated. The loss of nutritional value when a vegetable is actually picked green is minimal, and canning and freezing methods in manufacturing have dramatically improved over the last several decades thanks to consumer awareness. I would be more concerned with prepackaged and frozen meals, which make liberal use of MSG (as do most salad dressings). Having more vegetables in your diet, whether frozen, fresh or canned is always beneficial, generally speaking. It is certainly tastier.
Of course having yourself a nice vegetable garden or greenhouse is nice too. My parents did and as a child I enjoyed fresh vine-ripened tomatoes as well as fresh rhubarb (strawberry rhubarb pie anyone?). Sadly I do not have a green thumb and do that today, so I resort to visiting the local uber-grocery or farmer's market. And I confess, having back-ups of onion-and-pepper-medleys in my freezer and stewed tomatoes in my pantry have become a regular thing.
Along with fresh limes in my crisper drawer.