Most annual vegetables send out flowers. It's their way of ensuring their own reproduction. The home gardener must manage flowers, tending the ones that will develop into fruits we want and removing those that distract the plant from its functions.
Leave the flowers on these plants, as they develop into vegetables:
tomato
cucumber
pepper
eggplant
peas
beans
squash, including zucchini, acorn, and pumpkin (a special case, as the blossoms are edible but if you eat them all, no squash will grow)
Remove the flowers on these plants, as their desirable leaves will bitter if flowers are allowed to bloom:
greens including spinach, kale, mustard, bok choi,broccoli raab, and lettuces
radish
herbs including basil, cilantro, thyme, and mint
Harvest from these plants before they go to flower:
broccoli
cauliflower
brussel sprouts
These flower stems are edible in addition to their root. If you do not remove these, the plant may use energy producing flowers at the expense of making root bulbs:
garlic (picked as curlicue scapes shown above)
onion
The delicate potato flowers may be picked or left on the plant. Marie Antoinette is said to have enjoyed these beauties in her hair. They may pull a slight bit of water and energy from growing tubers, but I enjoy leaving their blooms in the garden.
Of course, you may grow these flowers as edibles:
sunflowers
nasturtium
violet
These lists are by no means exhaustive. Which flowering vegetables have I forgotten? Which do you have questions about?