From Bulbapedia, the community-driven Pokémon encyclopedia.
The Dimensional Scream (Japanese: 時空の叫び Spacetime Scream) is a special ability and also a key plot device in Pokémon Mystery Dungeon: Explorers of Time and Darkness, and also in Explorers of Sky.
It is first discovered by the player when he/she picks up an apple that an Azurill dropped. Suddenly, the player gets dizzy and sees a vision of the future, where the same Azurill is held by Drowzee against its will. When the player's team goes to rescue it, it turns out the vision was right. The Scream happens again just before entering Waterfall Cave, however, the player sees a vision of the past, where Wigglytuff is shown entering the cave through the waterfall. It is revealed by Dusknoir that the Dimensional Scream ability shows the user visions of the past or future when someone or something is touched.
When stuck in the future, the player tries to use the Dimensional Scream to get a clue as to what to do next, but nothing happens. Grovyle later explains that this ability only works in regards to the Time Gears, and that it must function differently in the past, as earlier visions had nothing to do with the Time Gears at all. Additionally, the user of this ability must be with a trusted partner for it to work. The player's partner and Grovyle both fit this role during the player's respective points in time. It is unknown how one obtains this ability; however, it appears that it functions for both Pokémon and humans since the main character could use the Dimensional Scream during his/her time as both a Pokémon and also as a human.
In the anime
Piplup of Team Poképals experienced two Dimensional Screams in Pokémon Mystery Dungeon: Explorers of Time & Darkness, both of them being visions of the future. The first one came at a night before the team's first mission, showing Piplup an image of himself, Chimchar, and Sunflora visiting the Kecleon Shop the following day. The next time was inside the Labyrinth Cave, where Piplup saw an image of a stone bridge collapsing, allowing him to prevent Chimchar from crossing it and falling into the ravine below.