When you start the game select two player mode and enter 'hg?' as your initials. Then exit and start One Player Mode and hold L1 and R1 and press Select at the World selection Screen to unlock all levels. Similarly do the same process again if you wish to lock the levels.
Place first in every high score board on every stage to unlock their world's respective bonus stages.