The dash or hyphen (-) works better than underscore (_)
From a search engine optimisation (SEO) point of view, dashes or hyphens are the preferred option in web page URLs. Google treat hyphens as a word separator but it sees underscores as joining words therefore it is suggested that hyphens are better to separate keywords in the URLs.
Dashes Or Hyphens are preferred by web users as well as by Google
From the user-experience point of view, hyphens also have the upper hand. Many users can clearly see hyphens as a separator, but underscores are sometimes really hard to read because it can be mistaken as a space, especially because links get underlined and the underscore is often sitting just above the underline.
Google also gives a guideline on the issue of hyphens versus underscores, in the URL structure help page regarding the usage of punctuation in the URL. It clearly says that it is recommended to use hyphens instead of underscores in the URLs.
Moreover, we know for sure how search engines (especially Google) treat hyphens, but we do not know how as much about how these search engines treat underscores, so why risk using them?