This is a recurring question and I don’t always remember why I prefer hyphens, so here’s the answer:
Consider using punctuation in your URLs.
The URL http://www.example.com/green-dress.html is much more useful to us than http://www.example.com/greendress.html.
We recommend that you use hyphens (-) instead of underscores (_) in your URLs.
Source: Google support
It turns out that, at least for google, the underscore works as a concatenator for words.
There’s also a video of Senior Google Engineer Matt Cutts, where he explains exactly this.
Another reason, aside for the Search Engine Optimization is this:
If your URL contains underscores the link will look similar to this:
Whereas if your URL contains hyphens, the link will look similar to this:
A user may mistake the underscores for spaces, as the underlining in the link hides the underscores. On the other hand, hyphens are clearly visible, so users are more likely to remember to type them.
So, the use of underscores in URLs impacts usability as well as SEO.
And if you are interested in the WHY it works this way, here it is Matt’s post about the WHY.