In most cases, the more recent the solder, the better it is. Flux chemistry has improved a significant amount ever since RoHS kicked in. I'll stick to leaded solder here for the most part, as that's what most guys are using. And, yes, it's the flux that expires in a roll of solder but you do get some oxidation as well depending on how you store it. Lead does not like being near wood for extended time periods, particularly if there's no ventilation. The US Navy found that out the hard way when a lot of the lead work in their museum models turned to dust over the years due to the very nice wood framed display cases.
The older solder type, which most people are familiar with, is 60/40 ... this means 60% tin and 40% lead (plus trace elements). Problem is that tin and lead have different melting points, and in an 60/40 alloy you get a short 'plastic phase' when it cools, where it's kinda solid but kinda not. So if your solder joint moves during this phase then things can go bad and you'll get a crappy solder joint. Almost every electronics tech and assembly house that's still using lead these days uses 63/37. 63% tin, 37% lead. May not seem like a huge difference, but in performance it's very significant. 63/37 is what's known as Eutectic, meaning there's no plastic phase on cooling. It goes from liquid straight to solid. This drastically reduces your chance of bad solder joints.
As to fluxes, there's primarily 4 different kinds that you'll see. RA, RMA, Water Soluble, and No-Clean. They all do the same job of clearing away oxidation to allow better alloying of solder joints, some are better than others, and they all have their quirks.
RA means 'Rosin Activated', and yes rosin does mean it's basically tree sap. RMA is 'Rosin Mildly Activated, not as aggressive. These have really gone away in the industry. Everybody is using WS or NC these days. RA/RMA fluxes are in the middle-ground for the ability to clear oxidation. Most older RA/RMA's are mildly corrosive over time if not cleaned .... and they are why you see big nasty brown goo spots on old repairs as the residue breaks down. It's also not easy to clean, you need aggressive chemicals to really get the stuff off of boards. The flux can also be conductive in some situations. More modern RA/RMA fluxes are generally nowhere near as corrosive as they used to be, but it's still not the best of the bunch in any category.
Water Solubles are what most production is done with these days. Good ones are the best of the bunch at clearing oxidation, give the best solder joints, and it's easy to wash away with just plain water .... which really simplifies the cleaning process. Problem is that water soluble is VERY corrosive if not cleaned off, and not all parts on a circuit board can be water washed. Even worse with modern low-profile BGA chips that you can't get water under them to flush the stuff out. Great for production work, not so good for home users due to the cleaning needs, particularly with harnesses under your playfield.
No-Clean's are exactly that, they don't require cleaning. The residues are non-conductive, non-corrosive, and safe to leave on the board. It takes a whole step out of the process. The trade-off is that it's much harder to clean if you ever decide to do that, and it's not as effective at clearing oxidation. Also means you've really got to dig in with a test probe as it can be a great insulator if thick enough. However for most guys here it's the optimal choice as you don't have that long term corrosion potential. I use Kester 245 for all my leaded work, which is a 63/37 alloy.
And just a quick word on the lead-free's, I don't use them because I want to, I use them because I have to. It's a requirement in the EU that all electronics must be less than 0.1% lead. There are NO exemptions in Europe any longer for Aerospace or Medical. So basically anything made to sell overseas is going to be lead-free these days, and California has also implemented some RoHS requirements for consumer electronics. The California rules do not have much affect on us just yet, as it really only applies to CRT and LCD screens, but chances are it's coming to more things in the future. It can be soldered well, but it takes more heat and duration, which of course increases the chance of damage. In the right conditions it can also develop whiskers, usually that requires heat, current, and moisture, but it is a real possibility. Not as easy to work with for sure, and more expensive. But I either use the stuff for the products I sell, or I lose the 30-40% of my customers that are in Europe. Easy decision.
-Hans