At the end of each level, the game gives you a score based on how many stars, red coins and flowers you collected. Each star and red coin is worth 1 point and flowers are worth 10. In Any% speedruns, these are purposely skipped because they take extra time to be counted on the score screen and they are simply not needed. In 100% however, it is required that you finish each level with 30 stars, 20 red coins and 5 flowers. Completing each level in a world with a score of 100 will unlock an extra level for that world and it is also required that you get 100 points on those as well.
Stars act as Yoshi's health and give you more time to reclaim Baby Mario if you get hit. Each star increases the timer by 1 unit and caps at 30. They are collected on contact or when tongued by Yoshi. Stars can be obtained from winged clouds (3 or 5 depending on the cloud), crates (6), tulips (8) or middle-rings (10). You can also get 2 stars by hitting an enemy (or other interactive sprite) with a red egg, as long as the egg breaks/cracks open. If you have more than 20 stars when collecting a middle-ring, the freeze that it causes will be shortened by 8 frames per star. If the ring cannot be skipped it's preferable to have as many stars as possible. This freeze can also be skipped entirely if you throw an egg at a winged cloud at the right time. In Any% speedruns, stars are available as a safety net, but are usually ignored, except for in 3-4. . There is theoretically no limit to the amount of stars you can get in a level, so long as you can make red eggs and hit something with them.
Red coins, often disguised as normal ones (with a reddish tint)  are the game's 2nd collectible. There are 20* scattered throughout each level, at fixed locations. Sometimes you will have to destroy all the enemies in specific rooms , ground pound posts , use vehicle transformations , or even break/crack open special eggs to get them. Red coins are collected on contact by Yoshi and by thrown eggs. They can also be tongued if the coin came from a flashing egg or a Shy Guy. They are slightly larger than normal coins and have no real purpose other than being a collectible. Even though you have to finish each level with 20 red coins in 100% speedruns, you can duplicate up to 3 to skip slower ones.
*3-E has 21 red coins. The developers may have included an extra coin as compensation if one happens to not load in (see sprite overload), that or it was simply an oversight. It is most likely the one in this post, underneath the Tap-Tap. 
Flowers are the game's 3rd and final collectible, with 5* in every level. Some are out in the open , inside winged clouds  and can even be earned from destroying all the enemies in specific rooms (like red coins).  They can be collected in the same ways as the red coins and additionally by a spit out enemy , shell , projectile  or watermelon seed  Each flower you collect gets added to the goal ring roulette, giving you more chances to get a bonus game at the end of a level and collecting all 5 gives you a 1up.
*5-7 has 6 flowers, the 6th being off-screen, above a guided platform section. (Likely due to a change in level design or an oversight by the developers). This flower is only able to be collected with an egg but it can be used in 100% speedruns to skip a much slower one.  If you have 5 and collect the 6th, nothing happens, aside from giving you an additional 1up.