A great question, and since a textbook could probably be written to answer it, there's probably not going to be any single answer. I want to provide a general answer tailored to hobbyists, and hope that people more knowledgeable can come in and tie up specifics.
Summary
Solder is basically metal wire with a "low" melting point, where low for our purposes means low enough to be melted with a soldering iron. For electronics, it is traditionally a mix of tin and lead. Tin has a lower melting point than Lead, so more Tin means a lower melting point. Most common lead-based solder you'll find at the gadget store will be 60Sn/40Pb (for 60% tin, 40% lead). There's some other minor variations you're likely to see, such as 63Sn/37Pb, but for general hobbyist purposes I have used 60/40 for years with no issue.
Science Content
Now, molten metal is a tricky beast, because it behaves a bit like water: Of particular interest is its surface tension. Molten metal will ball up if it doesn't find something to "stick" to. That's why solder masks work to keep jumpers from forming, and why you see surface-mount soldering tricks. In general, metal likes to stick to metal, but doesn't like to stick to oils or oxidized metals. By simply being exposed to air, our parts and boards start to oxidize, and through handling they get exposed to grime (such as oils from our skin). The solution to this is to clean the parts and boards first. That's where flux cores come in to solder. Flux cores melt at a lower temperature than the solder, and coat the area to be soldered. The flux cleans the surfaces, and if they're not too dirty the flux is sufficient to make a good strong solder joint (makes it "sticky" enough).
Flux Cores
There are two common types of flux cores: Acid and Rosin. Acid is for plumbing, and should NOT be used in electronics (it is likely to eat your components or boards). You do need to keep an eye out for that, but in general if it's in the electronics section of a gadget store it's good, if it's in the plumbing section of a home supply/home improvement store, it's bad. In general, for hobbyist use, as long as you keep your parts clean and don't let them sit around too long, a flux core isn't necessary. However, if you are looking for solder then you probably should pick up something with a rosin core. The only reason you wouldn't use a flux core solder as a hobbyist is if you knew exactly why you didn't need the flux in the first place, but again, if you have some solder without flux you can probably use it for hobbyist purposes without issue.
Lead Free
That's pretty much all a hobbyist needs to know, but it doesn't hurt to know about lead-free solder since things are going that way. The EU now requires pretty much all commercially-available electronics (with exceptions for the health and aerospace industries, as I recall) to use lead-free components, including solder. This is catching on, and while you can still find lead-based solder it can lead to confusion. The purpose of lead-free solder is exactly the same: It's an evolution in the product meant to be more environmentally friendly. The issue is that lead (which is used to reduce melting point of the solder) is very toxic, so now different metals are used instead which aren't as effective at controlling melting point. In general, you can use lead-free and lead-based solder interchangeably for hobbyist uses, but lead-free solder is a bit harder to work with because it doesn't flow as nicely or at as low a temperature as its lead-based equivalent. It's nothing that will stop you from successfully soldering something, and in general lead-free and lead-based solders are pretty interchangeable to the hobbyist.
Tutorials
There are plenty of soldering videos on YouTube, just plugging in "soldering" to the search should turn up plenty. NASA has some old instructional videos that are great, because they deal with a lot of through-hole components. Some of these are relevant because they discuss the techniques and how the solder types relate.
In general, if you got it at the electronics hobby shop, it's good to use for hobbyist purposes.
Also called the "(Standard or Large) Tamiya Connector" in R/C speak (ref); not sure if other manufacturers make them (guaranteed someone somewhere does), but here are the Molex part numbers (Digi-Key) for the Wire-to-Wire connectors:
Device Side (usually)
Battery Side
Molex does not make this style in Wire-to-Board; so any knockoffs of just Molex product probably won't either.
An easy-to-use replacement with both Wire-to-Wire and Wire-to-Board that I've used are the Molex Mini MATE-N-LOK 2 connectors (like these), depending on the current you may need regular MATE-N-LOK.
Best Answer
The material that most ICs are encapsulated in (the ubiquitous hard black plastic) is epoxy, which is a thermosetting polymer. This is opposed to most materials referred to as plastics, which are thermoplastic polymers.
Thermoplastic polymers are made up of many separate polymer chains of various lengths (molecular weight) that don't actually have any bonds to other nearby chains. Instead, the material is an amorphous, glassy tangle of chains jumbled together, or a more orderly crystalized structure of chains arranged in a repeating pattern, depending on the specific material. As a result, with enough heat, these chains can freely slide past each other, and the more heat, the easier it becomes. Eventually, the heat makes the plastic behave like a liquid more than a solid, which allows for things like injection molding or 3D printing.
There is a temperature where this transition from solid to deformable semi-solid to viscous liquid occurs called the glass transition temperature, or \$ T_{g} \$. Here in lies their weakness. All of the common and cost-effective thermoplastics also have relatively low glass transition temperatures which are well below the melting point of even leaded solder. Add in that a soldering iron's tip is usually a fair bit hotter than the melting point of solder (for good heat flow to occur), these materials don't stand a chance against a soldering iron. They're really only designed to withstand one to a few brief reflow heating cycles in a reflow oven, and sometimes not even that for through hole connectors. There are some high performance plastics like polyetheretherketone (PEEK) or thermoplastic polyimide (Kapton) that have glass transition temperatures far in excess of soldering temperatures, but these materials are also extremely expensive - PEEK is on the order of 20 times the cost of more common plastics. Yet other thermplastics like PTFE (Teflon) can certainly withstand the temperatures but have other properties (usually mechanical) that make them unsuitable for the use in connectors etc. You can buy teflon insulated wire (at some added cost), and a soldering iron won't hurt the insulation on those wires at all. They're also extremely frustrating to strip because they're so slippery.
Thermosetting polymers, on the other hand, are still polymer chains like thermoplastic polymers, but these chains have undergone a chemical reaction that has caused these chains to cross-link, or form ionic or covalent bonds with other chains. In other words, the chains are linked and locked in place. Heat doesn't cause them to soften. Sure, if hot, their chains would indeed slide past each other easily like with thermoplastic polymers, but this doesn't matter because the chains can't move. This is the same mechanism that separates soft and meltable natural or synthetic rubber from the much harder and more durable vulcanized rubber used in tires. It is the same material, but the vulcanization process induces cross-linking between the chains of rubber.
Thermosetting polymers, like any 2-part epoxy you might buy at the hardware store to the epoxy used to encapsulate power transistors to ICs alike, usually exist as liquids in their uncured (no cross-links and short chains) state. They are mixed with a hardener that forms part of the cross-links as well as initiates them (sometimes heat and/or pressure is also needed) and the material will set into a hard, rigid material. This process is generally irreversible, and for this reason, thermoset polymers don't melt at all. Turning into a liquid would require breaking the same chemical bonds that make up the epoxy itself, so any heat capable of melting it simply decomposes (destroys by ripping the chemical bonds of the molecules apart) into different chemicals instead. This also means that you need temperatures hot enough to thermally decompose the material, or break the covalent bonds forming the very molecules themselves.
This temperature is going to be a lot higher than thermoplastic glass transition temperatures, so it is much harder to damage these materials with heat, and you need much higher temperatures.
Now, the reason they don't simply make connectors or other things out of thermosetting polymers isn't any single silver bullet answer. There are many reasons and the exact ones at play depend on the product and dozens of other factors. But generally:
Thermosetting polymers have properties very poorly suited to certain applications. They are very hard and brittle, and shatter with little ability to bend or otherwise deform. They are also much less durable in the thicknesses that thermoplastics tend to be used in, requiring more thickness and bulk for strength. This of course also makes them totally impractical for anything that needs flexibility, like wire insulation. That said, many shielded inductors are manufactured with thermosetting polymers where the coil is fully encapsulated in the shielded grey to black block. Often, the magnetic material is mixed into the thermoset polymer. This is a popular style in SMD power inductors.
Thermosetting polymers are impossible to process like thermoplastics can be. You can't use thermosetting polymers in injection molding machines. To reach the final state, thermoset materials fundamentally require a chemical reaction to occur (and it has limits to how fast it can be made to occur), whereas thermoplastic polymers can be processed with heat alone - you heat them to shape them, then cool them to solidify them, and you can do this as many times as needed. This makes the manufacturing processes completely different at every possible stage and imposes all sorts of limitations that a process or manufacturing engineer could probably spend hours discussing.
Demand. There simply isn't any widespread market need or demand for soldering iron/hotair rework resistant connectors, wires, etc. and making them so would reduce manufacturability, increase cost, lower durability, and likely increase size. Very old electrical components actually did tend to use thermosetting polymers, but they were also big, heavy, and expensive. Any tube amplifier would be filled with parts encapsulated in Bakelite - the first manmade polymer ever, and also a thermosetting one.
This isn't to say such components don't exist - they very much do. Or at least, high temperature ones. I already mentioned PTFE wire, but there is also silicone insulated wire that can withstand soldering temperatures, and plenty of high performance thermoplastics with melting points even higher than teflon (whose heat resistance is already nothing to sneer at, considering it is used to coat frying pans for cooking). There is magnet wire that is coated with some sort of enamel that can withstand 200°C continuous and is generally impervious to damage from a soldering iron. I actually hate this kind of magnet wire because you can't just crank your iron all the way up and burn the enamel off, you have to use sand paper or something to abrade it off. But it exists, and it isn't even particularly more expensive.
Inductors are more often limited by the magnetic core material losing magnetic properties before wire temperature becomes the limiting factor.
There are definitely switches (usually very expensive ones) that won't melt - but they're simply made of metal. In this case, there isn't really a compelling advantage to use thermosetting epoxy, as most customers want switches that have high durability and likely are not too concerned with high heat resistance since, presumably, the switch is intended to be operated by a human. Humans are even less tolerant to soldering temperatures than thermoplastics, and have an even narrower operating temperature range. Mine is about 68-72° F and outside of that, most productivity or proper functioning stops and I mostly just complain about the temperature. It's a common malfunction.
There are surely yet more reasons, many probably very specific to a certain application or need behind this. The real, single silver bullet answer is simply this: pretty much everything is made out of the right material as determined by market demand, usage, cost, and various physical properties balanced by what the people buying these parts want but are willing to pay for.
And these days, most parts are made for mass automated PCB assembly and not repair or rework, for better or worse.