Wikipedia covers this:
The em dash is used in several ways: primarily in places where a set of parentheses or a colon might otherwise be used, it can show an abrupt change in thought or be used where a full stop (period) is too strong and a comma too weak.
It may indicate an interpolation stronger than that demarcated by parentheses. (The degree of difference is subjective.)
- Compare parentheses with em dashes:
- Three alkali metals (sodium, potassium, and lithium) are the usual substituents.
- Three alkali metals—sodium, potassium, and lithium—are the usual substituents.
- Compare commas, em dashes and parentheses (respectively) when no internal commas intervene:
- The food, which was delicious, reminded me of home.
- The food—which was delicious—reminded me of home.
- The food (which was delicious) reminded me of home.
Written dialogue can sometimes benefit from the first two (commas or dashes) in that the third (parentheses) may not suggest speech cadence to the reader as directly as the first two. But the difference is subtle and may not matter to every writer. In contrast, the third may have a subtle advantage over the first two in expository writing such as scientific writing and technical writing, because speech cadence is irrelevant there and technical readers may appreciate the grouping and nesting of phrases and clauses that brackets (and bracket nests) allow. Again, the subtlety of this distinction makes the choice a minor one.
To summarize, from weakest to strongest it's: comma
(), and em dash
Dialogue favors commas and em dashes to help emphasize changes in tone, but parenthetical grouping has an advantage in technical writing for its nesting abilities.
It's still largely up to personal preference.