As Servy notes, the official SE policy is "don't migrate crap."
In my experience, it's actually quite rare for flagging a question for migration to be the optimal choice:
If the question is new and has no answers yet, it's better to close it as off-topic and tell the asker to repost it on the proper site (as happened with your example question). This avoids wasting ♦ moderator time on things that the community (and the OP) can take care of.
Conversely, if the question is older than 60 days, then it cannot be migrated, not even by ♦ mods. Thus, there is no point in flagging such questions. Also, migrating questions that do have answers is also officially discouraged (although not actually prevented by the software).
In particular, if the question already has correct answers (and the answers aren't themselves blatantly off-topic), that's a sign that it may not be completely off-topic after all. In such cases, it may be better to just edit the question to remove the off-topic parts, leaving a valid on-topic question.
In any case, it's quite possible for a question to be (more or less) on topic at multiple SE sites. Such questions should not be migrated.
Finally, if the question is heavily downvoted, has poor spelling and/or grammar, or otherwise appears to be of low quality at a glance, moderators are likely to decline the migration, no matter how much you may think that there's a pearl of a question hiding under the dirt.
So the "sweet spot" for migration is a something like relatively new (but not brand new) question that is clearly written and generally perfect in every way, except for being obviously on the wrong site. It should also have at least one good answer, but the answer should also obviously belong on another site. And ideally, despite being blatantly off-topic, it shouldn't be too heavily downvoted (although migration does reset negative scores to zero nowadays), but also not too heavily upvoted, either.
Honestly, there just aren't a lot of questions that meet all those contradictory requirements.
Of course, you may be lucky, and get a sympathetic mod that will migrate the question even though it's not that awesome, or even though it might be marginally on-topic at its current site too, or even though the OP could just repost it. To maximize your odds of success, you may, before flagging, wish to do the following*:
Copyedit the question, fixing any spelling and grammar errors and making sure the general structure of the question is clear and to the point. Do not wait to do this until after the migration!
Generally, you should edit the question as if it was already on the target site, so that it will be obviously on-topic when migrated. However, don't edit a marginally on-topic question so as to make it off-topic on the current site — there's a fine line to tread here. Also resist the temptation to use features (like MathJax) that aren't actually enabled on the source site. ;-)
Leave a comment on the question, stating that you think it's off-topic on this site, but would be a good question on <site X>, and that you've flagged / will be flagging it for migration. Besides being a useful pointer for the OP, in case the migration is declined, such a comment may also discourage downvotes on the question, and lets other users express their support for the migration by upvoting your comment.
Make sure that the question actually would be a good fit for the target site. You may wish to visit the target site's chat room and ask if they want the question before flagging it for migration.
If the question has a low score, consider upvoting it.
If you can cast close votes, vote to close the question as off-topic.
Finally, when casting the flag, do explain any specific reasons you may have for thinking that the question needs migration. If you've already asked the folks at the target site if they want it, include a chat permalink.
One thing I don't really have enough data on is whether, if you can answer the question yourself, it's better to do so before it's migrated. On one hand, SE policy does discourage migrating answered questions; on the other hand, posting an answer does serve as prima facie evidence that the question is answerable, and may also demonstrate that the essence of the answer (and thus, by extension, of the question) is outside the scope of the site.
In any case, if you could answer the question, but for some reason don't wish to do so before migration (e.g. because your answer really needs a feature like MathJax that the current site doesn't have), do make sure to note this in your flag, and/or in your comment on the question. FWIW, I have successfully flagged several questions for migration that I'd also answered myself, so at least it's not a definite no-no.
*) Note that these suggestions are all merely personal opinions based on my experience as a (formerly) active migration flagger. They should not be taken to reflect official SE policy in any way, except by coincidence.
Ps. One more thing I forgot to mention: What if you really think that a particular question would be a great addition to another SE site, but it can't or won't be migrated for some reason? Maybe it's too old to migrate, maybe it's actually on topic at both sites, or maybe you went with the "close and ask OP to repost" route, but the OP has vanished?
In all these cases, there's a simple solution: Ask the question yourself, in your own words, on the other site.
Although users are discouraged from simultaneously asking the same question on multiple SE sites (to avoid wasting community effort), it's perfectly fine to have essentially similar questions on different sites. Of course, where needed, you should reword the question to better suit the target site, and you definitely should also include a link back to the original question, both for clarity and attribution, and to provide access to any existing answers there.
This works particularly well if you can also provide a good, definitive answer to the question at the same time. If the original question already has a good answer, you may also wish to post an answer on the other site that links to and briefly summarizes it. (Technically, since all content on SE is CC-By-SA licensed, you could even copy the original answer verbatim, provided that you attribute it properly. If you do that, it's usually considered good form to mark the copied answer as Community Wiki, so that you won't gain "undeserved" rep from it.)