If you see large black or golden-brown bees flying in your garden or landscape, don't be alarmed! These insects are most likely carpenter bees, and although their large size and loud buzzing can be intimidating, they are mostly harmless. Males can't sting and females rarely do, and both are considered beneficial because they are pollinators.
Female carpenter bee. [J.K.Clark]
However, sometimes carpenter bees bore into lumber or trees to make nests and may damage structural wood or leave unsightly holes and stains. Multiple bees may use a common entry hole, tunneling several feet into wood to create chambers for their offspring.
The best way to manage carpenter bees boring into wood is through prevention. Use hardwoods in structures where possible and paint or varnish exposed surfaces. If you find carpenter bee holes and nests in your structure, wait for bees to emerge and fill the holes with steel wool or caulk to prevent the bees from reusing the holes the following year. Pesticides are usually not necessary.
Male carpenter bee. [R.S. Vetter]
Read more about these insects in the Pest Note: Carpenter Bees. http://ipm.ucanr.edu/PMG/PESTNOTES/pn7417.html