The time to vote for your favorite candidate is in the primary. By the time my state voted Warren had already dropped out, but I was going to vote for her.
Sometimes, in very rare circumstances (and for races other than President), you have to strategically vote in primaries. These are basically House or state legislature races when there's a nutter and you're crossing the aisle to get a less reprehensible candidate.