My personal guess is: sometimes it does, but usually it doesn’t.
My basic logic is simple. In contested elections these days, both candidates get huge amounts of money and spend it all trying to sway votes, with the greatest sums being spent in the last few months before the election. Yet, in the majority of cases, the results of the election are pretty close to what the polls predicted before most of the money was spent. Furthermore, the great majority of voters says that they make a certain decision of who to vote for long before the election occurs. Most of the advertising dollars therefore are wasted showing ads to people who can’t be swayed.
There is some research that backs up this idea. In Freakonomics, Steven Levitt claims to have found statistical evidence that campaign spending doesn’t matter. (Of course, given that some of his research is fraudulent, one doesn’t know whether that means anything or not.)
There certainly are a few cases where money has an effect when it’s spent wisely. If a candidate starts the race as a complete unknown, an advertising campaign can inform the voters who he is and what he stands for. Also, a creative and hard-hitting ad can have a much larger effect than the normal, boring stuff that most campaigns produce. For example, in the 2008 North Carolina Senate race, the Rocking Chairs ad was followed by a huge movement of support away from Dole and towards Hagan.