Like Siddow said, there's lots of reasons--it's different for every writer. Like, me, I plan to use a pen name for my romance novels. Why? Because the other stuff I write is young adult fantasy. So, if I make a name for myself with the latter, do I want kids who've read my fantasy books to look up my name and find heavily sexual vampire smut? Nope. I'll probably use my real name for just about any other genre I write, but I want to separate the kid-friendly from the adults-only, so that my reputation in one genre doesn't affect my reptuation in another.
Everyone will have their own reason. A lot of times, actually, the reason for pen names is purely practical: escaping death on the midlist. If you've already published a book or two, and they did kinda okay but not really all that good, then when you publish your next one, you may want to do it under a different name. Why? Because bookstores use statistics to decide how many of a book to order, and if they see that an author's previous book didn't sell all its copies, then when their next book comes out, they'll order less copies than last time. And the next time, it'll be even less. And less. And of course, the less books are ordered, the less books will sell. A pen name can help you escape the vicious cycle and start over if you really need it.