Sweet peas smell gorgeous and their colourful blooms can be cut for vases in the house. Growing some next to your beans can attract bumblebees – I've often watched a bumblebee methodically visiting every bloom on a wigwam of sweet peas and then going on to pollinate the French beans planted alongside.
Attracting certain insects can also help with pest control. For example, the larvae of hoverflies feed on aphids. Hoverflies like pot marigolds. So by planting a few marigolds around your tomatoes, you can attract hoverflies and thereby protect your crop.
Hoverflies and wasps will also eat the caterpillars of cabbage white butterflies, so planting marigolds with your cabbages could be a good idea, too. Another way to prevent cabbage white butterflies from laying their eggs on your crops is to plant nasturtiums nearby. Nasturtiums are attractive to butterflies, and with any luck the cabbage whites may choose to lay their eggs on the nasturtium leaves, instead of on the cabbages. Well, it's worth a try, anyway.