Bomb Mario, (or alternatively sometimes called Bomb Wario), is a powerup first appearing in Super Mario Land 2: 6 Golden Coins.
In this game, Mario takes on this form. Wario, later, appears in Wario Land: Super Mario Land 3 and later on takes on the formation to delete files. He also does this in Virtual Boy Wario Land. This formation cannot be used in gameplay.
This method is only used to erase save files by selecting a pipe and exploding underneath the pipe. This then results into a normal formation when blasting out. Same method goes with Wario.