Yes, but only if you are playing the Virtual Console versions of these games.
You cannot use Poké Transporter to directly transfer Pokémon to your Pokémon Sun, Pokémon Moon, Pokémon Ultra Sun, and Pokémon Ultra Moon games from any physical games previous to Pokémon Black Version, Pokémon White Version, Pokémon Black Version 2, or Pokémon White Version 2.
However, there are some steps you can follow to reach your goal.
Use the Game Boy Advance Game Pak slot on a Nintendo DS Lite or Nintendo DS to transfer Pokémon from Pokémon FireRed, Pokémon LeafGreen, Pokémon Ruby, Pokémon Sapphire, and Pokémon Emerald to an area called the Pal Park in Pokémon Diamond, Pokémon Pearl, Pokémon Platinum, Pokémon HeartGold, or Pokémon SoulSilver.
Then, using two systems from the Nintendo DS family, transfer your Pokémon from Pokémon Diamond, Pokémon Pearl, Pokémon Platinum, Pokémon HeartGold, or Pokémon SoulSilver to Pokémon Black Version, Pokémon White Version, Pokémon Black Version 2, or Pokémon White Version 2 using the Poké Transfer Lab that exists within those games.
For more details on how to use these functions, please refer to the instruction manuals for the games in question.
Can’t find what you’re looking for? Click here to submit a service request form.