In a printed document, don’t underline. Ever. It’s ugly and it makes text harder to read. See for yourself—
Underlining is another dreary typewriter habit. Typewriters had no bold or italic styling. So the only way to emphasize text was to back up the carriage and type underscores beneath the text. It was a workaround for shortcomings in typewriter technology.
Neither your word processor nor your web browser suffers from these shortcomings. If you feel the urge to underline, use bold or italic instead. In special situations, like headings, you can also consider using all caps, small caps, or a change in point size.
Not convinced? I invite you to find a book, newspaper, or magazine that underlines text. It’s a look mostly associated with supermarket tabloids. If that’s the impression you want to make with your writing, by all means, use underlining. If not, don’t.
Another reason underlining looks worse than bold or italic: underlining is mechanically applied by the word processor. Bold and italic styles are specially designed to match the basic style of the font.
The “track changes” feature of your word processor will underline text added to the document. This is fine. In fact, it’s another reason not to use underlining for emphasis—so readers don’t confuse text that’s marked as a revision with text that happens to be underlined.
On the web, it’s idiomatic (though not mandatory) to underline hyperlinks. On the web, this becomes another reason not to underline words for emphasis—visitors will be confused when they click on them and nothing happens.