Below is a list of all hats and how they can/could be obtained.
Hive Store Hats
The following hats can currently be purchased from the Hive Store:

Can be purchased on the Hive Store, or by clicking here.
Rarity: Epic

Can be purchased on the Hive Store, or by clicking here.
Rarity: Rare

Can be purchased on the Hive Store, or by clicking here.
Rarity: Uncommon

Can be purchased on the Hive Store, or by clicking here.
Rarity: Uncommon

Can be purchased on the Hive Store, or by clicking here.
Rarity: Uncommon

Can be purchased on the Hive Store, or by clicking here.
Rarity: Rare

Obtained by purchasing the Broomstick mount.
Rarity: Uncommon

Can be purchased on the Hive Store, or by clicking here.
Rarity: Uncommon

Can be purchased on the Hive Store, or by clicking here.
Rarity: Uncommon

Can be purchased on the Hive Store, or by clicking here.
Rarity: Rare

Can be purchased on the Hive Store, or by clicking here.
Rarity: Epic

Can be purchased on the Hive Store, or by clicking here.
Rarity: Epic

Can be purchased on the Hive Store, or by clicking here.
Rarity: Rare
Unlockable Hats
The following hats can currently be unlocked:

Obtained by gifting another player a hat.
Rarity: Uncommon

Awarded for reaching level 10 in Block Party.
Rarity: Uncommon

Awarded for reaching level 18 in Block Party.
Rarity: Rare

Awarded for reaching level 25 in Block Party.
Rarity: Epic
Unobtainable Hats
The following hats are not currently obtainable:

Obtained by purchasing the Block Friday 2022 bundle.
Rarity: Uncommon

Obtained by purchasing the Block Friday 2022 bundle.
Rarity: Uncommon

Obtained by purchasing the Block Friday 2022 bundle
Rarity: Epic

Obtained by opening the 12th daily gift during Winterfest 2022.
Rarity: Epic

Obtained by helping Santa during Winterfest 2022.
Rarity: Uncommon

Awarded for completing the Lunar New Year 2023 banner hunt.
Rarity: Epic