Exclamation points add emphasis! In formal English, they’re used sparingly, but informally, they’re often disturbingly necessary. (That was a lot of adverbs, but I refuse to delete them just because someone didn’t like them ages ago.)
Formal use The places they’re used in formal English are in actual exclamations (Oh no!), and it’s recommended that you not use more than one per page. Don’t use multiple in a row, and generally avoid using them for longer sentences: She was determined to keep going, no matter what anyone said.
Emphasis Informally, however, you can use plenty! Except don’t, because they’d lose their emphasis and thus their dignity!! (Sorry.) Anyway, their loud, bright sound has more use in informal writing, though a period then carries more weight in a heavier sort of emphasis like in the last sentence: She was determined to keep going, no matter what anyone said. If you want to sound more lighthearted (and indignant), that can become, She was determined to keep going, no matter what anyone said!!! It’s louder but has less gravity. In the same way, it’s recommended to replace Behind her, she heard wingbeats! with She heard something approach behind her. Wingbeats. But in something like Yay, I can’t wait!, it’s a good choice. It can also be used after a question mark for emphasis: How did they know?!
Friendly or cheerful tone In informal English (among younger people especially), exclamation points can also be important to sounding friendly.
Indignation A question mark can be replaced with an exclamation point when the question is really an indignant exclamation: Why would I want to leave indeed! How dare they insult me!
Notes It can also be used as a shorthand for something being important: As long as she went unseen (!), she could get there soon after dawn.
Exclamations within sentences See Parentheses, Comma, Quotation Marks, and Em Dash/Long Dash/Dash.Placement It is used directly after an exclamation (see Parentheses, Brackets, and Quotation Marks). A dash or ellipsis before an exclamation point gives a bit of hesitation or an ironic pause, though this is very uncommon: Obviously — ! I should think so . . . !