Note that this is based on a previous answer I posted here.
How could Sweden become a major power, despite being poor, backwards, far away, with no real allies or diplomatic support? I'll try to keep the list short.
Sweden has never been a feudal country. This is important, as it allowed the Swedish Kings to build a centralised state without having to fight a large class of nobility with lots of resources and land to resist any change. 1500 the free-holding Swedish peasants amounted to 62% of the population and owned 52% of the arable land. The nobility held only 22%, with the church holding most of the rest. Swedish peasants were compared to continental serfs well-off, motivated, fought for their rights and resisted violently any attempt to enserf them or encroach on their old rights - including representation in the riksdag, the Swedish estates parliament. This meant the King could ally with the peasants, since they were a real power factor, and use their fear of increasing noble rights to get their support for an expanded central state.
When Kristian II of Denmark executed much of the Swedish high nobility at Stockholm's bloodbath 1520 despite promises of amnesty he might have though he finally ended the constant Swedish rebellions, but in fact he ended the century long Swedish civil war between the various noble families jockeying for power and alternative supporting the Kalmar Union or a Swedish King or Riksföreståndare (a title somewhat akin to Viceroy), but instead he galvanised resistance and eliminated all possible resistance to Gustav Eriksson (Vasa) who incited the peasants and mountainmen to revolt, allied with the Hansa and crushed King Kristian's forces.
Gustav I (as he is now called as he is elected King) proved to be a superb administrator and a shrewd politician and diplomat. Getting lucky in the Hansa declining and Denmark going into a civil war (the Counts' feud) he got the time to build a centralised effective state, dealing with internal opposition (several revolts, the most severe being the Dacke War a large peasant rising), going protestant, siezing church property including about a third of the arable land) to pay off the debts to the Hansa, making monarchy heraditory instead of elective and many other things.
From here on, Sweden is ahead of most of the world in usings its resources effectively. The nobility is not strong enough to resist as the land ownership amongst them is concentrated at the top. Most do not own enough land to live comfortably off of, and have to become administrators and officers in service of the state rather than states within the state as in many other nations. Gustav I forced through an inventory of all land in the nation - who owned it, how productive it was and thus how much tax was owed on it, greatly increasing tax efficiency.
Sweden is rich in natural resources - iron, copper, silver, wood, tar, herring (made into oil). Access to copper and silver and most of the peasants being well enough off to grow some kind of cash crops allowed for a coin-based economy to replace bartering earlier than in many other nations, further increasing the effectiveness of the economy.
Sweden got Estonia from the crumbling Livonian Confederacy and the important trading city of Reval, to go with Viborg on the other side of the Bay of Finland. In the Ingrian War against Russia (during Russia's Time of troubles, a long period of civil war, unrest and war) Sweden captured Ingria and the mouth of the Neva river, which meant that almost all trade to and from Russia had to go through Swedish tolls, creating a major source of income for the Swedish state.
During the 1600-29 against Poland Gustav II Adolf learned the value of offensive shock cavalry, created the world's first light and mobile artillery and refined infantry tactics into something new. He based his new army system off of Moritz of Oranhe's reforms, but improved them further, creating a professional military force of all artillery, creating mobiel light artillery that could support the infantry directly on the battlefield and flexible and mobile formations that were much more effective use of soldiers than the Spanish tercio used by the Imperials in the 30 years' war.
From here, Sweden relied on excellent generals (Gustav II Adolf, Banér, Torstensson, Königsmarck, Karl X Gustav, Wittenberg, Karl XI, Rhenskiöld and many others) and essentially endless war and plunder on foreign soil to keep its war machinery going. French subsidies was often forthcoming, and Sweden kept the Habsburgs more than busy and unable to unite against France. Sweden ravaged, murdered, pillaged, plundered and raped its way through Germany in the 30 years' war 1630-48 and Poland in the Great Deluge 1655-60 and ravaged Denmark in wars 1643-45 and 1656-58. It is sometimes said as a joke that everything nice and cultural in Sweden was taken from Prague 1648 or Warsaw 1655.
Karl XI created a citizen-soldier part time army with the indelningsverket system, where peasants were freed from tax duties if they equipped a solder and provided him a croft. These soldiers trained 2-3 months per year and used extremely offensive tactics. When Karl XII marched into the Great Nordic War, the Swedish army fought dozens of battle, usually outnumbered 2-3 to 1 (the best odds in any major battle was 1,2 to 1) 1700-21 and won all (at least the major ones) of them against Denmark, Russia, Saxony and Poland-Lithuania up until Poltava 1709. After that, the Swedish Empire crumbled.
TL;DR. Never being feudal, luck, building a very effective administration, effective use of resources, effective armies, excellent generals, plunder economy.
No one else has mentioned the simple fact that, much like America in the aftermath of WWII, Sweden was one of the few countries without a damaged "industrial base" after the 30 Years' War, to use a blatantly anachronistic turn of phrase. Germany had previously dominated the Baltic, with shipping interests like the Hansa enforcing a virtual monopoly on Baltic trade. After the war, Germany lay in ruins, with perhaps a third of her male population dead. The Low Countries were also pretty thoroughly trashed, the Netherlands having only just secured her independence from Spain after a brutally prolonged war, and with Denmark and Sweden's centuries-long wars finally resolved in Sweden's favor, the Empire was well-placed to expand. Her annexation of Skåne after 1658 and a large chunk of the southern Baltic coast certainly helped in that regard. With the rise of a strong Swedish shipping industry (this is the era that saw the proliferation of trade companies, with concerns in Africa, the Orient and briefly the Americas) and the new monetarization of Sweden's economy, the Empire gained an economy befitting a military "Great Power."