Em dashes —

There are 3 types of dashes:

  • the em dash is the longest, with the width of a letter 'M' (—)
  • the en dash is shorter, with the width of a letter 'N' (–)
  • the hyphen is the shortest (-).

The main purpose of the em dash is to separate and highlight text within a sentence. Unlike commas or brackets, the dash actually throws more emphasis on what it separates. You can also use the en dash for this function, but format:

  • an em dash with no spaces around it: 'text—text'
  • an en dash with a space on either side: 'text – text'

Some writers and editors prefer the em dash because it is more prominent and it reserves the en dash for other functions (such as spans). The ASG supports the general trend toward spaced en dashes, particularly in electronic texts, because this is cleaner and creates fewer problems in a file.

There are 3 ways that a dash helps to separate yet highlight text.

Abrupt changes in content
Use an unspaced em dash instead of a comma
The director’s position was clear—but the CEO stayed firm.

The most common use of a dash is to amplify or comment on the first part of a sentence in the second—but to draw most attention to the second part. A comma will also separate these elements, but it does not emphasise them to the same degree. 

He suggested this was usual practice—but that's not the point.
He suggested this was usual practice, but that's not the point.
This function works best as an abrupt change in point of view, where you first state a fact but then want to comment on it as the author.
Amplification
Use an unspaced em dash instead of a colon if you want to illustrate a statement
Too many issues remained unresolved—cost, condition and location.

You can also use a dash instead of a colon if you want to give some examples that amplify or illustrate a point you are making.  

There are 3 benefits in taking this approach—improved quality, reduced costs and more efficient processing.
There are 3 benefits in taking this approach: improved quality, reduced costs and more efficient processing.
Most of the time, a colon will work better for this function, particularly if you are taking a neutral position on the examples. Reserve the dash for when you really want to underscore or colour what you list.
Parenthetical remarks
Use a pair of unspaced em dashes instead of brackets
He paused—his files were not organised—before carrying on to the meeting.
The third use of an em dash is to highlight parenthetical elements within a sentence. In this case, enclose them with a dash on either side.
The user testing confirmed our recommendation—which we have stressed for some time—that we need to simplify this form.
The user testing confirmed our recommendation, which we have stressed for some time, that we need to simplify this form.
The user testing confirmed our recommendation (which we have stressed for some time) that we need to simplify this form.

Technically all 3 options above are grammatically correct, but rhetorically only the dashes provide the right level of strength for the emphasis intended here.

If you wanted to de-emphasise this parenthetical comment, the commas would then be appropriate. The brackets would make the comment milder again.