From the Super Mario Wiki
The Golden Hammer is an item that first appeared in Famicom game Wrecking Crew and reappears in the Wii game Super Smash Bros. Brawl. It is based on the Hammers found in the Mario series, which had the same uses and effects. It is similar to the Hammer from previous Super Smash Bros. games, except that the Golden Hammer is far more efficient. It stands on a pedestal, and when picked up, the player starts swinging the hammer up and down, devastating anyone who gets hit. It is swung faster than a normal Hammer. Repeatedly tapping the item button will allow the player to float in mid-air while holding this item, unlike the hammer. Each hit does 30% damage. It launches characters at a more horizontal line than a regular Hammer. Although the head does not fly off like the regular Hammer, it does have one other problem that will randomly occur; it will become the Golden Squeaky Hammer. The Golden Squeaky Hammer will only squeak if it hits someone instead of doing damage. However, it can still allow the player to float in midair.
The Golden Hammer can also be used to open the windows in Challenges. They can be earned by completing challenges that have windows containing Golden Hammers, which there are only five of. However, Golden Hammers cannot break windows that pertain to challenges related to Boss Battle Mode. However, PAL versions of the game do not have this limitation.
 Trophy Information from Super Smash Bros. Brawl