The modern use of the term Scandinavia rises from the Scandinavist political movement, which was active in the middle of the 19th century, chiefly between the First war of Schleswig (1848-1850), in which Sweden-Norway contributed with considerable military force, and the Second war of Schleswig (1864) when Sweden’s parliament denounced the King’s promises of military support.
Scandinavia as a 19th century political vision
The movement proposed the unification of Denmark, Norway and Sweden into a single united kingdom. The background for this was the tumultous events during the Napoleonic wars in the beginning of the century leading to the partition of Sweden (the eastern part becoming the Russian Grand Duchy of Finland in 1809) and Denmark (whereby Norway, de jure in union with Denmark since 1387, although de facto merely a province, became independent in 1814 and thereafter was swiftly forced to accept a personal union with Sweden).
Finland being a part of the Russian Empire meant that it would have to be left out of any equation for a political union between the Nordic countries. A new term also had to be invented that excluded Finland from any such inspirations, and that term was Scandinavia. The geographical Scandinavia included Norway and Sweden, but the political Scandinavia was also to include Denmark. Politically Sweden and Norway were united in a personal union under one monarch. Denmark also included the dependent territories of Iceland, the Faroe Islands and Greenland in the Atlantic ocean (which however historically had belonged to Norway, but unintentionally remained by Denmark according to the Treaty of Kiel).
The end of the Scandinavian political movement came when Denmark was denied military support from Sweden-Norway to annex the (Danish) Duchy of Schleswig, which together with the (German) Duchy of Holstein had been in personal union with Denmark. The Second war of Schleswig followed in 1864. That was a brief but disastrous war between Denmark and Prussia (supported by Austria). Schleswig-Holstein was conquered by Prussia, and after Prussia’s success in the Franco-Prussian War a Prussian-led German Empire was created, and a new power-balance of the Baltic sea countries was established.
Even if a Scandinavian political union never came about there was a Scandinavian Monetary Union established in 1873, with the Krona/Krone as the common currency, and which lasted until World War I.
The modern Scandinavian cooperation after World War I also came to include the independent Finland and Scandinavian as a political term came to be replaced by the term Nordic countries, and eventually by the Nordic Council institution, in 1952.