Fireworks

Fireworks are found in many Mario games dating back to the very first Super Mario Bros. video game. At the end of every level, with the exception of a castle level, fireworks would go off when Mario or Luigi entered the tiny castle (if the last number of the timer is 1, 3, or 6 at the end of the level). If the last number was 1, one firework would go off; if the last number was 3, three fireworks would go off and so forth. Each explosion would award the player with 500 points.

Other Games
The fireworks appeared in other various Mario games merely as a background additive. They usually serve no importance, but are a nifty reference nonetheless.

Super Mario Bros.: The Lost Levels
Fireworks appeared again in Super Mario Bros.: The Lost Levels. They worked exactly the same as they did in Super Mario Bros., even awarding the player with the exact same amount of points.

Super Mario Bros. Deluxe
In Super Mario Bros. Deluxe, fireworks are seen at the end of the same levels as in the original NES version. However, when the player beats the game, a picture of Mario making a "peace sign" in front of Princess Peach's Castle shows fireworks in its background.

Super Mario RPG: Legend of the Seven Stars
In Super Mario RPG: Legend of the Seven Stars Fireworks are an item obtained from a Mole Man in Moleville for 500 Coins. They can be traded in for the Shiny Stone in the same town. If Mario purchases one, the fireworks display at the end of the game will be Mushroom-shaped. Purchasing three yields a Fire Flower, while five or more results in a Star.

Mario Golf: Toadstool Tour
In Mario Golf: Toadstool Tour, fireworks are displayed in the background of the last few courses of Peach's Castle Grounds. They are beautifully colored, and can sometimes distract the player.

Mario Party 7
When a player wins party mode on Mario Party 7, they will appear atop Princess Peach's Castle; fireworks are going off in the background.

New Super Mario Bros.
In the DS remake of the original game, Fireworks were once again used as a fairly common feature of the game. When the player completed the level correctly and perfectly (which takes two times on certain levels), Fireworks would go off behind the castle. This time, the player did not have to have a time ending with 1, 3, or 6; As long as the level was finished the right way, up to nine Fireworks would go off.

Trivia

 * In Animal Crossing, fireworks can be seen in the big lake on the Fourth of July. These fireworks very closely resemble the fireworks found in Mario Golf: Toadstool Tour. The funny thing is that Animal Crossing was released before Mario Golf: Toadstool Tour, making some wonder if the fireworks design was taken from Animal Crossing.
 * Oddly, the fireworks found in Super Mario Bros. look like Podoboos.
 * The fireworks were small red dots that sound like a Bullet Bill firing when the went off.