Before taking any actions to kill carpenter bees, you should first assess whether or not it's really necessary to do so. Carpenter bees are beneficial insects and efficient pollinators. They're also non-aggressive and almost never sting; so except for people who are so allergic to bee stings that they can't afford to take any chances, carpenter bees present almost no threat to humans.
What this means is that if the bees are infesting an unimportant piece of wood (such as a piece of fascia board on a dilapidated shed that you wish would fall down anyway so the county would stop taxing you for it), then the best approach may be to simply ignore them. Other than drilling holes, they do no harm and much good.
When it is necessary to kill carpenter bees, they are not particularly difficult to kill. Like bees in general, they are highly susceptible to a wide range of insecticides. The problem lies in getting the insecticide into the holes.
Remember that the entrance hole is just that - an entrance hole. The actual gallery may extend a foot or more in either or both directions, along the line of the wood's grain. Sometimes the tunnels may also "branch off" into new tunnels inside the wood, if it is of sufficient thickness. And because the tunnels are packed with eggs and wax, any insecticide applied is not going to penetrate very far.
Furthermore, carpenter bees often drill holes in hard-to-reach areas that make treatment even more difficult. For example, using a power sprayer from the ground to spray the surface of an infested piece of wooden roof trim will have little or no effect. You have to get the insecticide into the holes.
That being said, if you want to try to kill your carpenter bees yourself, you can use any insecticide labeled for carpenter bee control, applied with whatever piece of equipment is best-suited to get that insecticide into the holes in a manner consistent with the label instructions.
If you can easily reach the holes, then one good choice would be an aerosol residual insecticide with a "straw" or "tube" applicator that you can use to inject the insecticide directly into their entrance hole. Inserting the tube through the eggs in the hole and then applying the insecticide as you pull it out of the hole usually will kill the entire nest. Even if the tube can't reach through all the eggs, any eggs farther in the tunnel that do hatch will likely die when they contact the insecticide on their way out.
If the mother bee is in the gallery, then the insecticide will kill her, as well. If not, she may just abandon the treated gallery and construct another when she finds it has been poisoned.
You can also use a dust insecticide that is labeled for carpenter bees, like Delta Dust. Inject the dust directly into the entrance holes and any exposed parts of the galleries. Delta Dust is less repellant and more water-resistant than most other dusts, so although it won't kill the eggs in the nest, it may kill the adult bees as they try to leave the nest after hatching.
Dusts tend to be more hazardous than other types of insecticides. They will readily drift away from the target area in the slightest breeze, and may blow back into your face from the holes you are treating. When using insecticide dusts, always use chemical-resistant gloves, protective goggles, and a P95 organic vapor respirator with a dust filter.
Don't necessarily expect your treatment to work the first time. To kill an entire nest, you may have to treat the same holes several times. This is because insecticides usually will not kill eggs that are already in the galleries.
If you can't reach the holes from the ground, you may want to consider buying a Dustick Duster, if you're using a dust insecticide; or an aerosol spray can extension pole adapter if you're using an aerosol insecticide.
Once the fall comes around, plug all the entrance holes with silicone caulking or a quality wood filler (not polyurethane foam), thoroughly remove any stains around the holes, and finish all of the exposed wood surfaces with a good, oil-based paint or stain or a wood preservative. If you can, remove the wood and finish the "back" sides, as well. Carpenter bees are less likely to attack wood that's been treated with an oil-based coating.
When replacement of the wood is necessary, use treated lumber whenever possible.
Related Page: Carpenter Bee Biology