What makes solder harden?
Solder on a circuit board is just as soft as the wire solder it came from, since it's the same material. However, the wire solder is not supported by anything, so feels much more bendable. Note that softness isn't the same as bendableness. Wire solder can also feel softer to something like pinching with your fingernails because most solder is hollow with a soft flux core, and you are collapsing it by pinching.
Solder on a circuit board is usually a thin layer that is well supported by a the board itself thru a thin layer of copper, and pins of whatever device is being soldered down. This makes it feel a lot harder than the unsupported wire.
@Kaz & @LongStrokinYerMomma are near to the right explanation.
When you talk about mechanical properties of a metal/alloy we have to consider lattice structures. And in this case not much chemical reaction is of our concern.
You see, two phenomena are responsible for this observation:
1. Re-crystallization
Ability of metal/alloy to be drawn into wire is called ductility. When solder wire's billet is drawn through various dies of reducing diameters - it undergoes a process called strain hardening which makes it more resilient (i.e. to bend repeatedly without fracturing easily) to shear/deforming forces as compared to the initial cubical billet of same alloy. Hence when you melt it, it loses strain hardening & undergoes re-crystallization which makes it appear more brittle.
2. Perfection of lattice structure
Diamond is the hardest material, not just because of its bonds but because of its perfect lattice structure. If you compare degree of perfection of lattices PER unit mass of a small cube, say 1mm3 & a large cube, say 20mm3 of chemically identical alloy/metal/mix, you will find the smaller cube to be more perfect hence stronger/harder than the larger cube, even though their chemical compositions are exactly same (this is what user @LongStrokinYerMomma pointed out in his Abstract from that paper)
To get a simpler everyday feel of it, think of breaking a stick, you can easily break a 2-feet long stick but not 10-cm long stick, yes in this case lever-action/torque-arm plays a role, but you get the idea.
Your logic:
The solder wire is less dense, either through being hollow or having a flux core, making it seem easier to bend. This seems less likely, because tin whiskers seems much harder than solder wire despite being thinner.
is perfectly valid, it partly explains why soldering wire is pliable. But note that the assertion Solder on a circuit board is just as soft as the wire solder it came from is definitely incorrect.
It's all about shape. A small bead of nylon is hard. A nylon fiber (such as a fishing line) is flexible. Ditto for glass and other materials. Glass can be a rigid crystal ball, a somewhat flexible window pane, cloth, or soft and fluffy insulation in your walls.