Well, no one likes this answer, but the real answer is it depends.
I will approach the two actions separately:
When should you edit a question?
- You should edit a question when you have non-trivial edits that make the question clearer and easier for others to understand.
When should you close a question?
- You should close a question when you believe a question fits a select number of criteria (the close reasons) and you are unable to alleviate those failing criteria by editing the question.
It follows that if you can make the question clearer and easier for others to understand, and possibly fix, then it makes sense to make those edits, even if you're going to vote to close it because you can't fix it yourself.
I mean, if you end up closing it, that's no big deal. I don't know if you can vote to re-open after voting to close, but if you can't you can always flag it for attention. Personally, I'd rather force-reopen occasionally than have content that will never get cleaned up stay open.