Weed is not a biological classification. It merely denotes a plant that humans do not want where it is growing. Some weeds were once used as food plants. Here I am going to identify weeds common in urban situations which may be legally picked and safely eaten. It is important to recognize that law affects foraging. You may not pull up a wild plant by its roots except on your own land. Hence burdock, which is a good edible root, is not included in this list of edible weeds. You must also beware of misidentification, hence I have avoided cow parsley, as it might be misidentified with poisonous species by inexperienced foragers. Never pick a plant to eat unless you are sure that it is the one you think it is, and have a good field guide to check any identification, if necessary. also you are legally obliged to gain permission if you venture to forage upon someone's land.
Some weeds are widespread on gardens and allotments. The commonest garden weed is dandelion. All parts except the stem may be eaten. The flowers and leaves can go into salads, and the roots, are edible. They used to be ground and used as a coffee substitute, but this seems to be out of fashion at the moment. Nettle is edible. Nettles have deep roots that mine minerals from the subsoil, and they are very nutritious. Only pick the top, young leaves early in the year, when the levels of oxalic acid are not high. Add them to stews. The sting disappears during boiling, but beware, they are very salty, so the stew might not need added salt. Found also in many gardens is ground elder. This was introduced as a salad vegetable by the Romans, and was used until parsley replaced it. It is still useful as a salad ingredient, and it is said to taste somewhat of parsley.
Chickweed and shepherd's purse are common in gardens. They are small, flimsy plants that seem to offer little nutrient, but they are edible and can be fried. The Chinese stir fry shepherd's purse. They take a couple of minutes in a frying pan or wok.
Dock is a member of the cabbage family and some people eat it. I have eaten it but regard it as famine food. It takes a long time to cook and is not particularly good, though some people eat young dock in dock and nettle pudding, which is eaten early in spring, when the plants are still tender and young.
Fat Hen and Good King Henry are widespread hedge weeds growing all over Britain. Along with their relatives, the Oraches, they used to be widely eaten and still make good salad ingredients.
Foraging is an interesting activity and an entertaining way of adding to your diet, and if you are interested there are plenty of books on the subject. Richard Mabey's Food for free is excellent, and River Cottage publish the River Cottage Handbook series, which is excellent, as you would expect from River Cottage