Forget states that are overwhelmingly Democratic or Republican. Even in a state that's extremely closely matched in terms of political opinion, your vote still has a vanishingly small chance of making a difference. First of all you have to consider the probability that your state will make a difference as to who wins the electoral college, which would only happen if the electoral vote totals are very close, and then you have to multiply that by the probability that your single vote can make the difference in who wins your state, which would only happen if there's an exact tie. See this paper for the results of such a calculation.
The bottom line is that it's an extremely small probability, which depending on your state could be as low as one in a hundred billion, and even the state where a person has the highest probability, the probability of your vote making a difference would only be one in ten million. As a point of comparison, the average person is only willing to pay a dollar to avoid a one in ten million chance of death, so assuming you value your survival over the outcome of the Presidential election, the von Neumann-Morgenstern rationality axioms state that it's irrational to vote if it costs more than a dollar to do so (for instance in terms of gas costs and the cost of your time).
There has in fact been a persistent puzzle among economists, especially the variety that believe that all human behavior is rational, concerning why it is that people vote in such large numbers when their vote almost never make a difference, not only at the Presidential level, but even at the level of local elections. One theory is that people are simply behaving irrationally, for instance because they overestimate the probability that their vote will matter.
Another theory is that people do it not merely because of the chance of changing the outcome of an election, but because it's an act of civic duty, although economist Steve Landsburg, in his popular book "The Armchair Economist", counters "But that ignores the fact that voting takes time away from other more productive acts of civic duty. You can spend 15 minutes casting an essentially meaningless vote, or you can spend the same 15 minutes returning shopping carts from the parking lot to the front of the grocery store. In the second case, you'll have actually made the world a better place."
Yet another theory (articulated in the paper I linked to) is that the outcome of an election, especially for President, matters quite a lot to people because it affects the lives of hundreds of millions of Americans, so the low probability is made up for by the high reward. That raises the question, though, of why most people aren't more politically active in a lot of other ways.
To my mind, perhaps the most plausible explanation is that people vote out of a Kantian ethic. In simple terms, Immanuel Kant's categorical imperative states that you shouldn't do an action unless it would be good if everyone did it. So the argument against not voting would be that if everyone listened to the advice of economists and stayed home, then a given person's vote would actually make a difference, so for that reason you should vote. Economists tend to be skeptical of that kind of reasoning, because they're generally utilitarians in their ethics, not Kantians. (Landsburg, for instance, says that it's "as true and as irrelevant as the assertion that if voting booths were spaceships, voters could travel to the moon. Everyone else does not stay home. The only choice that an individual voter faces is whether or not to vote, given that tens of millions of others are voting.") But I think the average person is more sympathetic to Kantian reasoning.