This happens to my front step railing every year or so. It's two things that have been mentioned, but in combination.
Carpenter bees bored into your wood to make their nests, and then a woodpecker came along and ate the bees in their nests.
Here's a cool article about the bees. http://entomology.ca.uky.edu/ef611