Do you think this is a good or bad idea? Why?
I think it's a... "meh" idea. Let's face it: even if you're running The World's Best Intro to C++ Course here, most of your students probably won't be bringing much to the table - it's all new to them! Granted, trying to answer a question you don't immediately know the answer to can be a great way to motivate yourself to do some research, but that isn't necessarily reflected in their reputation score; by making that a goal (and putting their grade on the line), you might just end up killing any intrinsic motivation they might have for the task.
But I like the way you're thinking... Lemme run another idea by you:
Make asking questions the assignment
Every so often, we'll get an email from a professor somewhere who found out one of his students used one of our sites to cheat on a test or take-home assignment. And chances are, when I check into it, the questions turn out to be pretty lousy; heck, it's not at all surprising to see someone just type the question or assignment in verbatim, followed by some variation on "I'm stuck. Halp?"
So chances are, your students really suck at asking questions. It's bad for us, because we get lousy questions. It's bad for you, because if your students don't know how to ask us then they probably don't know how to ask you either, and there's less of you to go around. And most of all, it's bad for them - at least, the ones that will eventually graduate and find themselves facing much more difficult questions in their pursuit of careers or graduate degrees. Knowing how to find answers by breaking down a problem and then either asking, or searching is an extremely valuable skill.
It sure would be great if they had some help prior to that point...
What if, upon handing out a take-home assignment, you told them:
If you get stuck, or are unclear on something, feel free to use Stack Overflow to research it - either by asking a question, or by searching for an existing one. Show your work: if you make use of a question, make note of the ID#. You'll get extra credit for every good, relevant question reference you turn in.
...or something along those lines. I don't know what your assignments or teaching style are like, but IMHO this would be a far more productive avenue for all concerned.
And hey, if you managed to get them to willingly submit their SO account IDs this way, you'd also be well-equipped to chide those lazy bums pasting their assignments in verbatim. Not that any of your students would do this of course. Just sayin'... ;-)