We use pronouns in writing a sentence or in speaking so that we avoid using the subject repetitively. So when the subject is already mentioned once, it would be easier to refer back to the subject if we want to talk more about it. For example: John is a very good student. He is very obedient and attends the class on time. The first sentence's subject is "John". But we want to add more details about him so we used the pronoun "he" on the next sentence.