From the Super Mario Wiki
Yoshi Cookies are the favorite snack of the Yoshis. They are featured as a special item in various Mario titles and also come in a variety of shapes including flowers, hearts, squares, circles and even Yoshi's face. Some cookies are chocolate and some are vanilla. And some are sugar cookies with icing in their centers or carry a checkerboard design.
In their debut title Yoshi's Cookie, a puzzle game, Yoshi Cookies enter from either the top or side of the screen as Mario, dressed as a baker, pulls a lever. The plot of the game, in a fashion similar to Tetris or Dr. Mario, is to clear them out as Mario continues to fill the screen with more cookies. This done by pressing the A button and shifting an entire row of cookies. Once a row is, either horizontally or vertically, filled with the same kind of cookie, it is cleared from the screen. The Yoshi-shaped cookie acted like any kind of cookie.
Super Mario RPG: Legend of the Seven Stars
In Super Mario RPG: Legend of the Seven Stars, Mario and Yoshi are required to bring Yoshi Cookies to Boshi in exchange for a race. Yoshi Cookies can also be used in battle where they summon Yoshi to eat an enemy and defeat it completely. Sometimes it awards Mario an item as well. However, some enemies and bosses can not be eaten by Yoshi; if so, Yoshi gives Mario a Yoshi Candy or returns another Yoshi Cookie back.
There is a pink Yoshi near the goal letters that can store Cookies for Mario, up to a limit of 200. If the amount of cookies goes over the 200 maximum, the Yoshi will eat the rest and if asked to store more cookies it will say it can't store any more.
Super Mario series
New Super Mario Bros. Wii
Super Mario Galaxy 2
Super Mario 3D Land
While Yoshi himself is absent from game, they make a very small cameo. In World 3-5, checkered Yoshi cookies appear as platforms.
Paper Mario series
In Paper Mario, if Mario gives Tayce T. a Melon and a Cake Mix, she will make a single Yoshi Cookie. This item restores fifteen HP and fifteen FP. The Yellow Yoshi in Yoshi's Village has a Melon if Mario brings him any type of food made with Cake Mix. This item can be sold for twenty coins. Another type of Yoshi Cookie named Big Cookie was also appeared in the game. Yoshi Cookies also bear a strong resemblance to the Zess Cookie and Sweet Cookie Snack from Paper Mario: The Thousand-Year Door and Super Paper Mario, respectively.
Game & Watch Gallery series
Game & Watch Gallery 4
In Game & Watch Gallery 4, the modern version of Mario's Cement Factory replaces cement making with cookie making. The cookies are from Yoshi's Cookie. If Yoshi gets the Yoshi Cookies from the top sent by Mario, he will instead eat the Yoshi Cookies instead of packaging them. If the Yoshi Cookies are sent to Toad at the right side, he will package them. Interestedly, the Yoshi Cookies fit in the packages whole.
Mario Kart series
Mario Kart: Double Dash!!
Mario & Luigi series
Mario & Luigi: Partners in Time
In Mario & Luigi: Partners in Time in Yoshi's Island of the past, Kamek searches for cookies for Baby Bowser. When Kamek gives them to him, Baby Bowser eats too fast, chokes and drinks some milk. Baby Bowser gets enraged when he finds out that Baby Mario and Baby Luigi ate the cookies while he was talking to Mario and Luigi. Luigi takes four Yoshi Cookies that Kamek dropped and gives one to Baby Luigi immediately. Later, he gives two cookies to Baby Mario and Baby Luigi to calm them down after entering Yoob's Belly. Luigi gave Baby Luigi the last cookie at the very end of the game, in exchange for Baby Luigi's Hammer.
Mario & Luigi: Bowser's Inside Story
Checkered Yoshi Cookies make a small cameo appearance in Mario & Luigi: Bowser's Inside Story. They are one of the various sweets that fall from the sky during Luigi's Snack Basket move. Luigi has to collect these snacks in order to do more damage.
In Tetris DS, Yoshi Cookies appear in the Puzzle Mode, which is based of the NES version of Yoshi's Cookie. They appear in the glass tube that forms the bottom and right edges, where they are constantly moving. They also appear on the Touch Screen of the same mode, forming a certain pattern in the background, and also in the foreground, where Yoshi is seen eating a heap of Yoshi cookies in the middle.