Generally speaking, honey bees and bumblebees have a "good press", wasps do not. Bees are associated with honey and the pollination of flowers and fruit trees. Wasps are often associated with being stung and with disrupting our meals when dining "al fresco".
Why is it that wasps want to invade our space and our meals?
Wasps, like bees, like sugary things (e.g. nectar). During the Spring and Summer, wasps can obtain sugars from the larvae that they are rearing back in their nest. The worker wasps hunt for insects in our gardens amongst the flowers and vegetables, and take back their prey to the nest. The prey is then fed to the larvae - which need a protein-rich diet in order to grow. In return, the larvae secrete (from their salivary glands) a sugar-rich fluid and the adults feed upon this.
However, by late August the number of larvae in the nest is falling (the queen stops producing eggs) so the adult wasps must find other sources of sugar. Hence, their attraction not only to floral sources but also ice creams, lollipops and other sugar-rich foods that we might be eating.
As adult wasps are predators (they can subdue the prey with their sting), they have an important ecological function in controlling the numbers of various garden pests such as greenfly (aphids) and caterpillars. The normal "yellow jacket" wasp has been estimated to eat 8kg of prey each season (see Seirian Sumner, an expert on wasps). According to her rough calculation, this amounts to a massive 14 million kilograms of insects each summer in the UK.
Wasps can also act as pollinators when searching for nectar. They do not have soft hairs covering the body nor a special body part for pollen storage (the Pollen basket) as do some bees; so pollen does not 'stick' to them well. However, they may be seen visiting various plants such as ivy, angelica and fennel.
With their sting and conspicuous warning coloration (the bright yellow and contrasting black), social wasps* are copied or mimicked by other insects. One form of mimicry is known as Batesian mimicry. In this, the mimic is harmless and the 'copying' is basically a form of 'bluffing'. Batesian mimics include various species of hoverfly. In another form of mimicry - Mullerian mimicry the mimic is also distasteful / dangerous and the mimicry can be considered mutually beneficial.
Note : Wasp nests found in or near houses (e.g. in roof spaces) can present a danger as the wasps may sting if disturbed. Stings are generally painful rather than dangerous, but in some cases, an individual may suffer a life-threatening anaphylactic shock.
[Social wasps live in colonies / nests with many hundred of others - in contrast to many species of wasp that are essentially solitary.]