I'm having some serious déjà vu here - I could have sworn I just answered this. Turns out I did, a couple weeks back, on a different site.
Reposted for convenience:
There's background here.
In an ideal situation, question closure is a temporary state. Either the closed question will be improved and reopened, or it will get deleted.
If the question is reopened, that's great! The asker deserves whatever rep changes come along with the votes -- even the ones from when it was closed. If the question gets deleted, all votes disappear anyway along with their respective reputation changes, so it's like it never happened.
But in the meantime, it doesn't hurt anything to vote on closed questions. (In fact, if I were a user with 500 rep, say, and I disagreed with a question's closing, the only action I'd be able to take is upvoting, since I wouldn't have reopen privileges yet.)