A summary of the issue, since this seems to be confusing to people:
Speaking specifically about the case where you already know the answer and are planning to answer before you ask the question, some people feel like you should go ahead and post the answer with the question using the little checkbox on the "ask a new question" page.
This is not a requirement, merely a suggestion that some feel saves the time of potential answerers. I'm personally not going to punish anyone (ie, downvote, comment, suspend, delete, etc) for answering after a short while.
More info follows:
This is a somewhat contentious issue (see this discussion on MSO, for example). It's been complicated further because the system changed to explicitly allow this situation after some of these discussions occurred. (Some folks would rather the asker not be able to do this at all, from reading some of these MSO threads...)
If you're planning on answering the question, you can save other answerer's time by posting the answer and the question in one swoop. However, you may discourage answers that might be better than yours by doing so.
There's some risk that if you wait your answer will be redundant with respect to other answers on the question. Thus, your answer might look like you're stealing theirs, even if you wrote it first.
I wouldn't say it's a requirement that you post the question and answer at the same time, but I would say that it's probably a good idea.
With my moderator hat on, I personally will not take any action if people decide to ask a question and answer it a few minutes later without using the checkbox. I will not leave a comment, a downvote, delete, or suspend, or take any other punitive action. The community may downvote or comment, however.