In chapter seven, Ralph is down and out. He fears they will never be rescued. He wanders down the beach. He is in deep thought. He thinks bout how vast the ocean is. He realizes that their chance for rescue is limited:
Unconsciously, he is tense, gripping a rock, arching his back, mouth strained open.
That is when Simon appears. He is encouraging. He tells Ralph that he'll get back. Simon is reassuring Ralph that he will get rescued. Ralph makes a negative comment. Simon again assures Ralph that he will get back to the life he once knew:
Simon appears at his elbow. “You’ll get back,” he says, insightfully knowing what Ralph is thinking from observing his posture. Ralph calls him batty and Simon repeats that he just thinks he’ll get back all right.
Simon always knows what to say. He is very perceptive. He can tell that Ralph is down. Simon tries his best to lift his spirits. He is certain that they will be rescued. He conveys this message, hoping to cheer Ralph. Simon must have been encouraging for the two boys suddenly smile at each other.
The two boys suddenly smile at each other.
Simon knows what to say to make Ralph smile. He knows that Ralph needs someone to be supportive. Simon is indeed a caring, sensitive individual who makes Ralph smile. Ralph needed to hear what Simon had to say.
In addition to the above answer, which is correct, the passage is also important for its foreshadowing. Notice that Simon doesn't say. "WE'LL get back..." He tells Ralph, "YOU'LL get back." This serves as a foreshadowing to the perceptive reader that Simon himself will not be getting back all right.