In The Road, Cormac McCarthy uses dreams to communicate how well the characters are persisting in their journey on the road. An important quote to take note of is on page 18 when the father says: "The right dreams for a man in peril were dreams of peril and all else was the call of languor and of death." The father is telling the son to take a sort of comfort in nightmares because it means that he has not given up and will continue to fight for his life. If he started having good dreams, that would be a cause for alarm because that would mean that he has slumped into a state of indifference and would be willing to accept any fate. This continues to show up as the characters are thrown into situations that really test their will to survive. One of the most significant occurrences is when the man has a flashback of himself talking to his wife. His wife tells him that "women dream of danger to those in those in their care and men of danger to themselves." She continues to say that she has become hopeless and therefore given up dreaming altogether. She has stopped using dreams as a form of escapism and accepted her fate in the new world. She commits suicide shortly afterwards.
The boy and the man refer to dreams in the same way. The man sometimes dreams of the old world and the boy has no experience in the old world to base his dreams off of yet they both accept the fact that nightmares are a good sign.