I wonder this when I read questions a lot on SO. Is it common convention when you see a new user make a question with bad formatting (not using proper code casing on SO or not using latex math formatting on mathematics) to edit their question for them so the formatting is nice and pretty, or to post a comment and ask them to format their question? Does it deserve a down vote for a poorly formatted question?
There are many tools at your disposal to help improve the site. Most of them involve positive reinforcement. Editing a question not only helps you receive rep for suggested edits, but it also drastically improves the quality of the content on the site, the quality of the answers, and the results of the question.
Editing the question may result in something that helps other people for years to come.
A downvote is negative: it costs the question asker rep. Chances are, it's not going to help improve the question.
My suggestion is to use downvotes as a last resort or when there is no fix. If a question can be fixed, and you know how to fix it, then you should do so.
- Comments - Leave a tip for how to improve the question, or ask for clarification.
Keep in mind that not every brand new user understands that he/she can format code on this site. As they gain more rep, they'll learn more about how the system works.
I say you should definitely fix the question, either by editing it yourself if you have the appropriate privileges, or by suggesting an edit otherwise. But remember that you're fixing the question to improve the community. You're not (and shouldn't be) doing it for the user; but instead for yourself and everyone else who does care about such things.
You might also choose to leave a comment if they're a new user who might not know about the formatting features that are available, or how to use them. Even though there's a sidebar explaining how they all work, some people apparently either don't bother to read this, or don't understand it when they do. Your comments just might be enough to persuade them to be more careful next time. Another benefit of having already edited their question is that they can examine your changes to see how you have fixed it. Having a concrete example may help people to figure out the syntax more than anything else.
Downvoting solely for a poorly-formatted question? Seems unnecessarily vindictive if that's all there is wrong. Personally, I wouldn't do it. But then again, there's a pretty strong correlation between poorly-formatted questions, and just downright poor questions. Since those deserve all the downvotes they get, you'll probably end up downvoting a lot of questions with poor formatting.
Also consider voting to close. If the asker doesn't care enough about their question to notice that their code is unreadable and try to fix it, it's very likely that they didn't care enough about their question to add the necessary details that make it answerable. That always screams "not a real question" to me.
Is it common convention when you see a new user make a question with bad formatting (...) to edit their question for them so the formatting is nice and pretty, or to post a comment and ask them to format their question?
It depends: if the user is really new (just a few questions/answers), then I edit it for them. I presume they notice the difference and will be able to do it properly themselves the next time.
I post a comment either if it'd take me too much time (large chunk of code that is badly indented), or in case of someone not so new, whom I think ought to know how to format a question by that time.
Does it deserve a down vote for a poorly formatted question?
IMO, no. I only down vote vague question (which after asking for clarification, does not get improved by the OP), not poorly formatted ones. A poorly formatted question does not mean it's a bad question