From the Super Mario Wiki
Star Yoshi is a form of Yoshis that only appears in the game Yoshi. In the game, putting lower and upper halves of a Yoshi Egg together makes a Yoshi slip out of the egg. If there are seven characters between the two halves (which is the maximum), the emerging Yoshi would become Star Yoshi and will award the player with 500 points. The Star Yoshi looks similar to a regular Yoshi, except that there is a Star floating above him, and the sound it makes is much more lower-pitched than a regular Yoshi.