There are a few reasons why pest can turn out a little on the bitter side. The oils in the pine nuts can cause them to turn a little rancid, the olive oil itself could be turning rancid, or the basil isn't all that fresh. It also could be the food processor. I don't notice this, and I always use a food processor to make pesto, but Cook's Illustrated found that olive oil contains bitter chemical compounds that really only shine through when the oil is emulsified (like in a food processor). The solution is to use the food processor to grind up everything except the oil. Add a little water to make a paste, then stir in the olive oil.