This was an interesting question that a friend posed me the other day, asking about when a dash or hyphen should be used, and when it shouldn't.
Unfortunately, there are no hard and fast rules for this. There are many resources that will give different answers, such as only using an en-dash to connect things, or only using am em-dash in the place of a colon or semicolon.
Further, there are resources that differentiate between an en-dash and a hyphen, which is a little silly, since when you're typing, they look identical.
But you may be wondering what the big deal is, and what I mean by "en-dash" and "em-dash." If you're the sort of person who doesn't use punctuation very much, you might even be wondering whether a semicolon is the one with the comma on the bottom or the one with two periods standing on top of each other.
And here's where the use and definition of punctuation gets a little messy. Because not everyone can agree on when simple symbols like quotation marks or commas should be used, let alone the less common marks like dashes and colons. Like language itself, the use and meaning of punctuation changes as people use it in new ways.
For example the tilde ("~" that squiggly line at the top left of most QWERTY keyboards) was an accent mark for some Latin-based languages, but has come to mean "this sentence sounds cute~" in online interactions. In a similar way, the asterisk ("*" the star above the 8 on your keyboard) used to indicate a footnote or an additional comment on a given text, but has come to function very much like quotation marks for actions.
Now, neither of these examples is accepted in academic circles, but the fact that is in common use today and is generally understood by the average internet user means that there has been a shift in the public understanding of these marks. Once the connotation (the emotional or surface-level meaning) of a word or mark has altered, it's a matter of time before the denotation (the dictionary definition of a word or mark) is also changed.
But let's reel this in and get back to dashes and hyphens.
When should they be used?
The answer is a little vague, but here goes:
The hyphen (a dash that separates two words or a word and a prefix or suffix) should be used to connect two words that are not yet accepted as a compound word. If the words combine to indicate a single thing (such as a thank-you note or a matter-of-fact tone) then using a hyphen to connect them is definitely a-okay.
An en-dash is functionally the same thing, though in theory it's supposed to be a little longer. This is what you use when indicating a range of things, like indicating a meeting will last 1:00-2:30. In addition, it can be used at the end of a word or sentence that's abruptly cut off in dialogue.
Example: "I never thought we would-"
The em-dash, on the other hand, isn't a mark you can make with your keyboard. It needs to be inserted by software, and is generally longer than an en-dash. Microsoft Word and similar software will often take any two en-dashes "--" and convert them into an em-dash. This symbol is sometimes used as a sort of comma substitute, indicating a pause in the sentence. It can also be used to separate part of a sentence from the rest, such as to replace parentheses or a semicolon.
Example: "There were only three of them--the red one, and two blue ones."
You can immediately see why these might be a problem, even for people that are used to using punctuation. For one thing, it's hard to properly use a mark if you can't make it with the keys on your keyboard. For another thing, the accepted uses and the "official" uses might not line up, so even if you use them in a way that seems perfectly clear and intuitive, someone can come along and tell you that you've done it wrong, which is never fun.
Since I personally prefer the the aesthetic of the en-dash anyway, I tend to use it a lot.
If you want my advice on how to use punctuation (any punctuation) I would recommend thinking about how the sentence would read out loud. It's a weird thought, but you can hear punctuation in how people talk, just like when someone sings, you can hear them smiling into the mic.