Yes. In fact, for centuries people have used lavender in herb blends for savory and sweet cooking, as well as for teas. Lavender is used today in chocolates, cookies, scones, muffins, cakes, and other baked goods. Baking with lavender can be easier if you first make lavender butter or if you buy lavender infused honey. The sweetness of culinary lavender lends itself well to baking and treats.
However, many people use lavender for savory cooking as well. Lavender is one of the herbs in Herbes de Provence, a blend of thyme, sage, rosemary, and other herbs, including culinary lavender. Lavender can be a subtle flavor that makes a marinade or sauce unique and it can be delicious when used in vinaigrette salad dressings.
While not considered unsafe, there are varieties of lavender that are less delicious to cook with. The most popular lavenders for cooking are usually English varieties. These culinary lavenders have a more gentle flavor, and the more aromatic French varieties, or true lavenders, contain camphor, which can have a more acidic flavor. There is no danger to using lavender that contains camphor, but the flavor is said to be less pleasant.
Lavender is also used for many beverages, both hot and cold. Lavender lemonade is the most popular cold beverage and lavender hot chocolate is probably the most popular hot beverage. Lavender has also been added to coffee drinks and some coffee beans or ground coffee can be bought pre-flavored with lavender. Lavender for hot chocolate and coffee drinks is often infused in the milk first. Otherwise, it is infused in a sugar syrup and added afterwards, which is how lavender lemonade is made.