To impress the audience, he causes a ruby-red rain to fall,making wet only those who want to be wet. this reminds him of his past life as Prince Vessantara, when red rain also fell. Thus, he tells this story.
when the Buddha completed telling the story of this past life,he stated that the people who are alive during his era and who have participated in his coming to Enlightenment are identical to those who participated in Vessantara's success