The three basic rules to choosing a quality URL are:
- Use keywords
- Use hyphens to separate keywords (not underscores)
- Keep it short
Keywords are very important as the words used in the URL have a high SEO (Search Engine Optimization) ranking. In other words, the keywords used in the URL will help users find your pages in Google, etc.
The reason to use hyphens (-) instead on underscores (_) is because search engines treat the hyphens as a word separater, but not underscores.
As a rule of thumb, keep the URL as short as possible but don't sacrifice the keywords for this reason; try to find a good balance between these two factors.
Sources