This is the best instruction I've seen regarding when to "take the lane" with a bicycle, and how to do it. In this video, taking the lane is referred to as controlling the lane.
I wanted to put together a post explaining all these rules and techniques, but this short video says it all, and more effectively than I could.
Demonstrated by League of American Bicyclists certified riders. "Just remember that cyclists fare best when they act, and are treated, as drivers of vehicles." Lots of other good videos available at InnerTube.