Of all the surprises Infinity War managed to bring, Red Skull's presence on Vormir has to be its biggest.
Presumed dead in the wake of Captain America: The First Avenger and in light of Hugo Weaving's criticism of Marvel Studios, Red Skull looked as though he'd already made his last contribution to the Marvel Universe, with his legacy continued under Hydra in Captain America: The Winter Soldier. That clearly wasn't the case though in Avengers: Infinity War, with Skull playing a pivotal role as the guardian of the Soul Stone on the planet Vormir. It's his words that make Thanos sacrifice Gamora to retrieve the gem, and while he's unseen for the rest of the film, he made one heck of an impression.
The character, now played by Ross Marquand, has been imbued with new powers, a ghostly new look and with the new title of Stonekeeper. The answer itself is provided at the end of Captain America: The First Avenger, where the character is sucked up into the Tesseract shortly after it projects a cosmic map onto his flying wing. Theories had abounded in the years since contemplating the character's destination, but Infinity War illustrates that the Cosmic Cube (also known as the Space Stone) had sent him to Vormir directly to safeguard its relative.
Interesting to note is that the Skull touches the Tesseract as he's dying. Sensing his impending demise, it's likely that the Stone sent the Skull to the one place where his presumably soulless self could survive - hence all the new powers and ghostly presence.
There's also the fact that in the comics Vormir is located within the Kree Galaxy. What's Captain Marvel set around? The Kree-Skrull War. The galaxy itself comprises dozens of planets of course, but when you also consider that Samuel L. Jackson mentioned that Nick Fury (who will also star in Captain Marvel) had been "trying to figure out what The Skull is going to..." in an interview the other year, there's a chance that we'll see more of his development in that film as well.