Personally, I prefer to go with someone; however, there is no set "rule" for a woman going to a bar with a friend vs themselves.
Most women go with friends because it makes them feel more comfortable to have someone they know, and a friend to watch out for them.
I've gone on my own before, but I still like having a friend with me, depending on the bar. A woman going alone in a bar spells "fresh meat" and I get annoyed with being hit on so much. Gah! I get the weirdest people hitting on me just on the bus, or when I'm shopping, or running errands and looking like a disaster. Uh, maybe flattering at first, but after a couple of years it can get pretty annoying and especially if you get some drunk guy who grabs your ass. Or, a guy who buys you a drink, and then expects something in return at "his place." Worse if the guy is a jerk or not attractive at all.
Yep, I've been there. I always set the line saying if they buy me a drink, there's no guarantee. I've swindled a few drinks too, actually... it's easy, but not really fair, so I try not to do it. Although, I have done it with games of pool... it makes it seem more far. Guys will usually try and lose to buy you a drink - I suck at pool, by the way, and I've never lost.
Also, if I guy gets you a drink, go with him to the bar as well. You don't want something slipped in your drink (I've been there, too).
Having a friend is helpful because you can watch each others' backs. Friends are great excuses to get away from creepy guys, and also helpful so you don't feel pressured going home with some stranger drunk.