In speech, we use intonation (the way our voices go up and down), facial expression and gestures to help express ourselves.
In writing, punctuation can help show how something is said.
Try reading these sentences out loud.
In the first sentence the speaker is simply stating a fact.
In the second example the question mark is used to show that the speaker's voice is going up in surprise at the end of the sentence.
In the third sentence the speaker is ordering the listener to go to the dentist, and this is shown by the exclamation mark. Italics could be used as well to show which word is given particular stress.
You are going to the dentist!