Pkmn:Memory Loss
Memory Loss affects many characters in the Pokémon Mystery Dungeon series. It may happen because of a variety of reasons.
Humans turned Pokémon
Many, but not all, humans lose their memories when turned into Pokémon. This does not seem to be inherently related to the transformation.
The Rescue Team Hero loses his/her memories at the beginning of the game because. Never regained.
The Explorers Hero loses his/her memories at the beginning of the game, when Darkrai attacks the portal. Never regained, although he/she learns about his past.
The Super MD Hero accepts to have his memories erased at the beginning of the game. This happens again shortly after, when the Beheeyem attack. Never regained, although he learns about his past.
Other Characters
Darkrai loses at the end of the story when the portal is attacked while he tries to escape.
The Super Partner erases his/her own memories before the start of the game, and regains them at the end of the main story.
Unaffected Characters
Hydreigon was supposed to make everyone forget the Gates to Infinity Hero at the end of the main story, but after he left, they still remembered him.
Unclear Status
Being based on the Super MD Hero, Riolu presumably lost all of his memories, although this is not directly mentioned.