Would you consider it appropriate if you were asked for your Stack Exchange username in a software job interview (or as a pre-interview screening question)? 

To me, it seems like a very reasonable request, and one that would be extremely informative -- I'm sure I could learn more about a candidate in five minutes by looking at the questions and answers they have posted on Stack Exchange than by a 30 minute interview. But would such a question be bad form? Is it "too personal"?

(Likewise for GitHub, or other public/online code sharing forums.)

Short Answer:  Absolutely OK.  

A little lengthier answer:
At my workplace, we routinely ask for a candidate's Stack Overflow / Stack Exchange username. Contribution to the Stack Exchange community leaves a much clearer trail of where someone is at with their skills.

I know others who ask for GitHub accounts and refuse to accept candidates without a GitHub account*.

In our case, we won't remove a candidate for consideration if they don't have an account.

Ultimately, it's just one piece of the interviewing puzzle as you're trying to identify a match between the company's needs and the candidate's skills.  It's not a make-or-break factor; it merely helps confirm impressions made during the interview.

* To be clear, I don't condone that approach, and I think it causes that team to miss out on otherwise well qualified candidates. I brought it up to point out having heard of more extreme stances and to show that just asking for a Stack Overflow account name is pretty mild in comparison.



Some additional qualifiers based upon comments:


We don't look at Meta Stack Overflow and meta type posts. Meta is different, and we understand that. It's also really easy to miss the context behind those types of posts. IMO, they are closer to noise than signal when it comes to evaluating a candidate.
Likewise, comments and review activity aren't considered. They lack context and they don't have a meaningful correlation to the candidate's ability to do the job.
We have found a solid correlation between a candidate's performance in an interview and the level of Q&A that they engage in. Their Stack Overflow / Stack Exchange account becomes a supporting factoid, equivalent to a submitted code sample during the interview process. 




Obligatory xkcd strip on interviews. Elaboration.
