In most cases, "the" is used with country names that are a description (the United States, the United Kingdom, the Soviet Union, the Republic of Korea), but not single-word names, (America, Britain, Russia, Korea [without "Republic of"]). The Netherlands is historical: think "Nether Lands" (i.e., the low countries).
You would also use "the" before countries with plural names, typically island nations (the Philippines, the Bahamas). This is likely a shortening of the X Islands, since that's used in many other contexts as well (e.g., the Falklands = the Falkland Islands).
However, there are several exceptions (the Gambia, the Congo, etc.). Finally, some are determined by fiat ("the Ukraine" is now just "Ukraine").