I have tons of basil in my herb spiral.
However, this stuff is precious, and I always feel bad when I throw away the basil flowers when I make pesto sauce.
Is there a way to use the basil flowers when cooking?
If you wanted to use them in cooking, I would recommend putting them in a sachet (a small pouch made of cheesecloth/muslin tied with cooking twine), as I know some people who don't actually like to eat the flowers, but enjoy the bitter tang they'll add to a dish.
They are edible, however, so if it turns out you like them, they make a beautiful garnish for a salad. I'm not a huge fan, so I generally stick with Martha's suggestion and keep them pinched so the plant produces more leaves.
Once the flowers appear, the plants energy and resources become more dedicated to flowering, and the leaf growth suffers. As mentioned in my comment on Martha's answer, I find that when the leaf growth suffers, the flavor of the leaves suffers as well.
This site recommends putting the basil flowers in olive oil, shaking, and leaving on a window sill for a month to make a light basil olive oil. I've never tried this, and I'm interested, though I'm a little wary of leaving olive oil in a clear container in the sun for a month. The general idea seems cool, though.
I love basil flowers. They are so much fun and I use them all the time. I have noticed that different varieties of basil at different times of the summer/growth stage will result in more bitter or delicate tasting buds. You'll just have to experiment, but I have definitely had some really floral tasting flowers this summer.
I'll throw them into a pesto for a more complex, slightly bitter flavor - I just make sure to pick off any woody stems.
They are a beautiful garnish for just about any stonefruit (plums, peaches, nectarines) - how about roast some fruit, serve with ricotta and some honey...with basil flowers? They are gorgeous in salads or panzanella....anything with tomatoes.
Finally, my favorite thing to do is use them to make basil flower ice cream. Steep them along with basil leaves in a plain ice cream base and remove them once you have achieved the flavor you desire. Keep in mind the flavor will develop if you let the base sit overnight (which I recommend) and it will also continue to strengthen a tad as it sits in the freezer. This is generally not a problem if you are making a small batch at home, but more of tip for professionals.
If you grow African Blue Basil, you'll have a TON of flowers that are not at all bitter at any time. We use them in all kinds of cooking, but our favorite use is to make Basil Bud Ice Cream. Literally the best ice cream I've ever tasted. The flavor of these flowers is the basil itself with strong floral overtones that mesh well. Great fresh as a salad topper too.
Honestly, you haven't lived until you try growing African Blue Basil. Everyone raves about it and everything we make with it. Just finished a MONSTER batch of pesto to keep us through the winter. Best plant I've ever grown, bar none. We had about 50-60 plants this year. Also, definitely top them as they grow in tridents and by topping them, you cause them to bush out a lot more dramatically.
I plant Basil along with my Tomatoes to deter insects. One Basil Plant every fifth Tomato Plant, and it really works quite well. I keep cutting the flowers off until near the end of the Tomato season, and then let them go. I have some African bushes that are three feet tall, and app. three feet in diameter. I usually give most away as either fresh, or I hang them in the shed to dry for people who like to preserve them. We do use some for flavoring, especially when we can Salsa or other Tomato products like juice, soup mix, etc.
I grow Queen Siam Thai Basil and Genovese Basil.
I use the flowers in soups and pesto mostly and I don't notice them being bitter or making the leaves bitter once the plants start flowering. The flowers do seem to have a condensed flavor. I do however snip the basil leaves while they are young and smallish since the taste seems cleaner and fresher when small.