The question presupposes that there's a single neat problem called "bad grammar". This is a very wrong approach. So the answer to "downvote for bad grammar?" is "It depends".
Bad grammar is a result of willful laziness or sloppiness.
Typically, it's very easy to spot: TXTspeak, all-lowercase, and more often than not, poor question quality irrespective of grammar.
VertictVerdict: Downvote away!
Bad grammar due to ESL issues.
There are no rules, BUT as many other answers noted, as long as the post is reasonably clear and decent quality otherwise, downvotingdown-voting is not constructive and contrary to the site's ideals. (full disclosure: I'm ESL and my grammar isn't always perfect, to put it mildly).
You're under no obligation to edit in the fixes; but it's the "right" and good thing to do.
However, ESL problems in otherwise good post should not be confused with a different problem:
Bad grammar due to poor thinking/logic.
Unfortunately, this OFTEN happens in posts with pure ESL problems... but if you read carefully, it's VERY easy to see the difference between "Had a clear thought in the original language and couldn't translate to English" and "Wrote a jumbled mess of words that wouldn't be understandable to a native speaker even before translation".
As with "willful laziness", this is usually easy to spot because the post would exhibit OTHER issues at the same time (poor quality, laziness etc...).
Please note that laziness is laziness. With a very rare exception, MOST ESL speakers come from languages that have capitalization and punctuation. Don't try to defend sloppy and lazy writer by "poor ESL" deflection when the post has no capital letters nor periods.