* Emphasis in handwritten or typed text (before widespread use of italics): Before italic fonts became easily accessible, underlining was frequently used to indicate emphasis or to highlight a word or phrase. This is largely outdated in digital contexts.
* Titles of works (sometimes): While italics are the preferred style for titles of books, plays, films, etc., some style guides *might* still allow underlining. However, italics are overwhelmingly preferred now.
* Hyperlinks in plain text emails or documents: Before rich text editors became ubiquitous, underlining was often used to indicate hyperlinks, since the visual cue was necessary. This is also largely outdated now, as hyperlinks are generally rendered in a different color and style automatically.
* Specific stylistic guides or legacy documents: Some very old or niche style guides may still prescribe underlining for certain elements. You should always adhere to the specific guidelines for the document you are working on.
In short: Unless you're working with a specific legacy system or style guide that explicitly requires underlining, it's generally best to avoid it. Italics or bold text are much more common and clearer ways to provide emphasis or indicate titles in modern writing.