A drastic edit is rarely called for—usually letting someone reap the votes they sow is best. Very rarely though, there will be a good answer buried in a terribly written post, which could be rescued with some significant pruning or rewording that remains faithful to the original.
How can you tell the difference? Well, you can't. What does and doesn't justify a drastic edit is always going to be a judgement call. On the one hand we are curators of the best solutions the internet has to offer for a problem, and we can fulfil that with our editing powers. On the other hand it's not our reputation attached to it, so it behooves us to exercise a significant degree of restraint when we use our edit privileges. Somewhere in the very large gulf between those two motives is where that judgement comes in.
One heuristic I use sometimes is: will the author thank me? If I'm going to improve it enough, and respect its intent and message enough, that the author will be grateful for a heavy editorial hand, then I'll go ahead with the drastic edit. If there's any doubt, if there's a notable chance they'll revert or be insulted by the changes, then editing is futile. This heuristic rules out almost all these kinds of edits, but it does leave the rare editing opportunity where it is likely to do a lot of good.
So: walk gently, but remember that you're carrying a big editing stick for a reason. Ignoring or indulging either extreme is suboptimal for the site.