On various poorly written questions, I've edited to make clearer and better which can end up producing a better and well-written question. However, if the original question was poorly written, should you downvote because of that, or should you upvote because the question you have just edited to make better is better at that point?
Vote on the final product
Nobody can stop you from voting how you want but the system has a number of features designed around people changing their votes in reaction to edits. This is why your vote unlocks after an edit and also one of the major driving forces behind the development of the follow feature.
In the end, the vote arrows are always next to the current post, and the older revisions are hidden away. Everyone else (or at least the overwhelming majority) is voting on what they see.
It doesn't matter that you were the one to make the edit. After you edit, vote on what you think the current post deserves.
The purpose of voting is to indicate the quality of a post, not as a reward/punishment for a user.
I agree with Laurel's answer, but the above maxim pretty much answers your question by itself.
If the purpose of Stack Exchange is to be a repository of information, then the purpose of vote scores is to indicate the quality and reliability of said information. An answer languishing on a negative score should be an answer that's wrong or not properly justified or otherwise considered low-quality; a question with a high positive score should be a question that's useful or interesting or otherwise considered valuable. From the help centre:
Voting up a question or answer signals to the rest of the community that a post is interesting, well-researched, and useful, while voting down a post signals the opposite: that the post contains wrong information, is poorly researched, or fails to communicate information.
It makes no sense, then, to vote on a post according to what the OP had originally written before edits. Voting sends a signal about the quality of a post, and if you downvote a post after editing it from bad to good, then you're sending the wrong signal about the now-good post. The only purpose of downvoting it would be as a way of "punishing" the OP for writing a bad post in the first place, but that's not what votes are for. The best way to deal with an OP who writes bad posts is to educate them on how to write good ones (e.g. by commenting or editing); if that fails, there are other tools available, up to and including suspensions for consistently low-quality contributions.
I've long thought that folks downvoting either questions or answers owed the author an explanation of what their objection was, and if appropriate a suggested fix. The system should at least encourage more useful feedback than blowing a raspberry. But I believe we've discussed that before and it got shot down.
Not My Problem, just my two cents.
Since your downvotes are (within reason) yours to use however you see fit, I can only really base an answer on my own experiences. Generally, I would downvote a question or answer where I perceive that the user has made insufficient effort to ensure that what they have written is in good or comprehensible English, even if I've since edited it into shape because I think it's worth salvaging.
This certainly doesn't mean penalising users for occasional spelling or grammar lapses but it does mean that those who really haven't bothered to use even the most simple of tools like spell-check or have decided to load their answers with stream-of-consciousness nonsense or l33tspeak should get some sort of warning that they're doing it wrong.
The FAQ advises us that...
"...upvotes are a great way to thank the author of a good post for the time and effort put into writing it!".
I'd argue that the converse is also true, that downvotes are a great way to advise the author that they've put in insufficient time and effort. On SE that means trying to make a reasonable effort with your posts (in terms of spelling, punctuation and grammar) and not treating other users with casual disrespect by expecting them to clean up your mess.