It’s very important to underline the title of a text because it tells your reader (ie, your teacher/examiner) that you are talking about the text, not something else.
For example, let’s look at Colm Toibin’s Brooklyn, which is also the name of a city. Let’s pretend this student has underlined nothing in the essay.
‘In Brooklyn, Eilis is forced to grow and develop into an independent young woman.’
Is this student saying that living in the city of Brooklyn, instead of Enniscorthy, changes Eilis, or is the student saying that this is what happens in general in the book? Nobody knows. And when nobody knows, you lose a mark.
If this student had been underlining all the titles, then it would be very clear that the student is writing about the city of Brooklyn.
‘Colm Toibin’s Brooklyn follows Eilis, a young Irish woman, through her migration experience from the little town of Enniscorthy to the sprawling metropolis of Brooklyn, where she is forced to grow and develop into an independent young woman.’
Or, if the student had underlined Brooklyn in the sentence, then it is clearly about the novel.
‘In Brooklyn, Eilis is forced to grown and develop into an independent young woman.’
I hope that was helpful!