From Bulbapedia, the community-driven Pokémon encyclopedia.
The Pokémon world is not the only planet with Pokémon on it. There exist several Pokémon that originated outside earth that have migrated there, as well as those who reside in their own dimensions. Many of these Pokémon can breed with terrestrial Pokémon, and evolve in the same ways. Poké Balls and items that work on terrestrial Pokémon work just as well on these. These Pokémon have adapted to the place where they landed on earth.
There are also myths involving Pokémon originating outside of the Pokémon world because of their resemblance and relation to extraterrestrial bodies.
Deoxys came to earth in a meteor.
A space virus fell to earth in a meteor, and was exposed to a laser beam. This caused the virus's DNA to mutate into the Pokémon Deoxys. Upon exposure to a meteorite, Deoxys's Forme will change. Deoxys has four formes, adapted for survivability in the wild, and its specialized formes have some of the highest base stats of any Pokémon. Its Attack Forme was adapted for combat against Pokémon native to earth, its Defense Forme was useful to protect itself from attack from Pokémon native to earth, and its Speed Forme was useful for fleeing. These formes in combination with its ability to regenerate lost body parts allowed it to survive in an alien world. Because of its exoticness, it is generally asocial. Deoxys is not an unique phenomenon, and it can communicate with others of its kind by creating an aurora.
#605 Elgyem and #606 Beheeyem
Elgyem and Beheeyem appeared 50 years prior to the events of Black and White Versions in the Desert Resort. It is unknown how or why they appeared, and they have not been seen since. This, and their having survived living in an alien world for 50 years, can be explained by their ability to rewrite the memories of the people and Pokémon around them. They survive hostile encounters by using their psychic powers to confuse opponents. Presumably because of the presence of Dark-type Pokémon like Sandile and Scraggy in the desert, they are no longer found there, and have relocated to high up in the Celestial Tower and Unova Route 14, respectively, where there is not a Dark-type to be found. These Pokémon are based on alien conspiracies surrounding Area 51 and the Roswell incident.
#173 Cleffa, #035 Clefairy, and #036 Clefable
The star-shaped Cleffa are said to have come to earth on meteorites. Wherever a meteorite lands, there is always a Cleffa near. Cleffa and their evolved forms, Clefairy and Clefable, dance in a ring on Monday nights, nights with a full moon, and on nights when meteor showers occur. Notably, the legends do not mention Clefairy or Clefable coming to earth on meteorites- only Cleffa. It still means that Clefairy and Clefable are extraterrestrial by extension, however.
In the anime, Clefairy have been shown to be capable of constructing aircraft and runways, which could offer another explanation for their origins.
The manga chapter Clefairy in Space from The Electric Tale of Pikachu revolves around the idea that Clefairy are extraterrestrials.
#174 Igglybuff, #039 Jigglypuff, and #040 Wigglytuff
The fact that Jigglypuff is commonly found living near impact sites, and that it evolves from a Moon Stone, could be seen as evidence that Jigglypuff and its evolutionary relatives, Igglybuff and Wigglytuff, are extraterrestrial in origin.
#120 Staryu and #121 Starmie
Starmie are said to be extraterrestrials because they are star-shaped and they emit radio signals into space at night. Staryu gather at night and flash their red cores to communicate with the stars.
Mew is said to be the ancestor of all Pokémon. Due to this, and the number of extraterrestrial Pokémon that have been discovered, it is possible that Mew inhabit other areas of the universe, and it is equally possible that they originate from a world other than Earth. Mew have been shown to be capable of flying through the vacuum of space.
#337 Lunatone and #338 Solrock
Lunatone and Solrock are said to have come from space and to be from the moon and sun, respectively, from which they gain power. They are both known as "Meteorite Pokémon," as they were discovered near meteorites.
#377 Regirock, #378 Regice, #379 Registeel and #486 Regigigas
Registeel's Pokédex entries state that the metal composing its body is not of this earth. By extension, this also puts the origin of its creator Regigigas into question, as well as that of the other Legendary golems, Regirock and Regice.
#480 Uxie, #481 Mesprit and #482 Azelf
An old legend in Lacunosa Town states that Kyurem fell to Giant Chasm in a meteor, and began taking Pokémon and people from Lacunosa Town at night for food. It is for this reason that the people of Lacunosa Town constructed a wall to keep Kyurem out, and stay inside their homes at night. In the middle of Giant Chasm is a small pond in a crater where the meteorite supposedly fell, and examining it will cause Kyurem to cry out and cause a blizzard in the area.
Pokémon that live in their own dimensions
In the anime, Unown have their own alternate dimension. Unlike in the games, it is a rare occurrence to see an Unown outside of this dimension, and something has been amiss every time.
Dialga lives in its own dimension, from which it governs temporal matters. This dimension collided with Palkia and Unown's dimension in The Rise of Darkrai, and thinking that Palkia was trespassing, the legendary Pokémon began to clash. In Pokémon Diamond and Platinum, Cyrus summons Dialga from its dimension to Spear Pillar using the Red Chain. In Platinum, a portal to Dialga's dimension appears at Spear Pillar if the player has the Adamant Orb. Notably, this portal will never appear at the same time as the portal to Palkia's dimension.
Palkia lives in its own dimension, from which it governs spatial matters. This dimension collided with Dialga and Unown's dimension in The Rise of Darkrai, and thinking that Dialga was trespassing, the legendary Pokémon began to clash. In Pearl and Platinum, Cyrus summons Palkia from its dimension to Spear Pillar using the Red Chain. In Platinum, a portal to Palkia's dimension appears at Spear Pillar if the player has the Lustrous Orb. Notably, this portal will never appear at the same time as the portal to Dialga's dimension.
Giratina lives in a parallel dimension of antimatter. In the anime, this dimension is the Reverse World; in the games, it is the Distortion World. In both dimensions, the normal rules of time and space do not apply. When it is not in this dimension, Giratina assumes its Altered Forme, however, holding the Griseous Orb reverts it to its Origin Forme. Because the other dimensions are inextricably linked with Giratina's dimension, Giratina will viciously defend its world if events in other dimensions threaten it.
Arceus lives in a high dimension, from which it stands guard over the entire Pokémon world, and will wake from its slumber to save it from annihilation. In the games, this dimension is the Hall of Origin. The only way to get there is by blowing on the Azure Flute, which has not been legitimately released, at Spear Pillar, the highest point in Sinnoh.