I think that Palin was a brilliant choice for McCain, for several reasons:
1) Change- I mean, when you're going against the man who wants to be the first black president, it's hard to position yourself in a change election with two white guys as your ticket. By having a woman as his VP, McCain takes away Obama's monopoly on the "obvious change" part of this election.
2) Appearance- Obama is a young, slim, attractive man with an attractive wife, while McCain looks like he has a goiter growing out of his neck, and his obviously mismatched marriage to a trophy wife just looks all the more glaring when compared to Obama's family. So you bring an a young, slim, attractive VP to counterbalance that. Think about it: McCain is just doing the same thing Obama did by bringing an old white guy aboard his ticket, just in reverse.
3) Surprise- I can honestly say, as an Obama supporter, I'm more excited about McCain's VP pick than Obama's. When I heard he picked Joe Biden, I thought, "That's nice," then went about my business. When I heard McCain picked Palin, I said, "Wow, she's hot, but who the hell is she?", and then proceeded to do some research on her. That right there is worth it's weight in gold: the instantaneous interest that McCain has generated around his campaign.
4) Attack/Damage Control- McCain essentially has a bulletproof VP in Palin. After all of the accusations of misogyny thrown around by the Clinton camp during the primary season, the Obama camp (and the news media in general) are going to go out of their way to not give the appearance of being overly harsh towards Palin. Obama's press release regarding her selection is the perfect example of that. The only person that can openly attack Palin is Hillary, and putting her out in the spotlight brings its own perils (like reminding all of those bitter women that Hillary lost).
5) Crossovers- Now this one may be a bit of a stretch, but I think it's pretty reasonable to assume that at least some independent voters are going to be swayed over to McCain's side thanks to his VP selection. I know a black Republican woman who is voting for Obama just because he's black, and I know she' not the only one. If people will cross over for race, who's to say that people won't cross over for gender?
If nothing else, his VP selection has made the race much more interesting.