Submarine Yoshi did not originate from fanon, and the information on this page may not be entirely accurate to their canon. You may read more about this subject in the context of their canon on the following wiki(s):
Travel underwater, fire torpedoes that home in on enemies.
Submarine Yoshi is one of the forms Yoshi and his species can transform into by touching a Morph Bubble in the Yoshi's Island series. In this form, Yoshi is able to dive in through bodies of water, as normally he is unable to swim underwater. In Super Mario World 2: Yoshi's Island, Yoshi can also fire torpedoes in this form. They will home in on nearby enemies defeat them. If Yoshi is hit by an enemy in this state, he will fall down a short distance, losing control for a short time. He will revert to his regular state if Yoshi touches a Yoshi Block or a timer runs out, the latter of which will take Yoshi back to where the Morph Bubble was.
In games following Super Mario World 2: Yoshi's Island, Yoshi loses the ability to fire torpedoes in this state. In Yoshi's New Islnd, Yoshi assumes this form by entering a Whirly Gate. Unlike previous games, the Nintendo 3DS must be tilted to steer Submarine Yoshi around.
A Brown Yoshi as Submarine Yoshi, firing a torpedo.