You get all of the hats in Find Mii by completing two playthroughs.
As listed by IGN, the hats from the first playthrough of Find Mii are
- Mario Hat
- Red Pikmin Hat
- Link Hat
- Samus Hat
- Kirby Hat
- Cat Hat
- Dog Hat
- Crown
And the hats from the second playthrough are
- Luigi Hat
- Toad Hat
- Bowser Hat
- Blue Pikmin Hat
- Yellow Pikmin Hat
- Metroid Hat
- Bunny Hat
- Ultimate Hat
When two heroes in a row are wearing similar colors, the same colors, or particular combinations of colors, they can "Create Team" to create a combo attack. This is the third option under "Attack" and "Magic" in your menu.
When your teammate joins the fight, together they'll have the option to "Combo Attack." If the colors are similar (ie, light green and dark green, or yellow and orange, pink and red, or purple and blue) they'll simply attack a bit stronger than they would have otherwise.
Here's a video of a "similar color" team in action:
If their colors are the same, they'll be able to do an extra strong version of their standard magic attack instead. Note that not all of the standard magic attacks are damaging towards enemies - some of them are simply beneficial towards your team.
In certain situations, you'll need to send in a combo of your team to handle a particular obstacle. These obstacles include:
- Ghost with Shadowlight Shield - Black + White
- Ice or Frozen room - Red + Red
- Poison or Gas - Yellow + Yellow
- Room of Fire - Blue + Blue
There are also a couple of "single specific ally" obstacles:
- Dark room - One white shirt ally
- White/blinding light room - One dark shirt ally
I used a couple of resources to compile this information which you might find useful. This guide, and this IGN Wiki guide were among the most beneficial sources of information.
Best Answer
If you are doing the regular quest in Find Mii 2, the final boss is the Dark Lord, which is essentially a tougher version of the Ultimate Ghost. He uses level down magic and is impervious to most kinds of Mii magic.
In the secret quest, it is the Dark Emperor, who is essentially a tougher version of the Dark Lord.