Aside from being a stupidly catchy song and amusing video, the song emphasizes a point: "You can go with this, or you can go with that," (Or you can blow it up, but we're trying that too, aren't we?). Blame Haihastur too for this one, since he touched on it in the comments here.
Defining the Term
'Opportunity cost' is a $20 term you'll hear in economics class that explains the idea that 'there is no such thing as a free lunch.' So, let's say someone buys you lunch. You spend time, go with them, eat, and may or may not enjoy yourself, the food, the company, etc. Right? Perfectly plausible.
See, the thing is that the lunch never cost you MONEY, but you still had to spend the time. You could have eaten somewhere else with different company, or simply worked through lunch and gone home early that day (assuming your workplace would let you).
The fancier definition is that when you pick one option, the opportunity cost is what you give up from the second best option. IE: I have $1 and a vending machine. I can buy a Nutty Bar (mmm, peanut butter and chocolate...) or a Coke (mmm, cleans engine parts AND refreshes!). If I buy a Nutty Bar, the opportunity cost was the coke. If I buy a coke, the opportunity cost was the Nutty Bar. If I don't buy anything, the cost of $1 was not eating from the vending machine.
Opportunity Cost in 40k Terms
Let's walk away from the vending machines in the break room and look at the force organization chart. I'm allowed 2 HQ choices, 3 elites, 6 troops, 3 fast attack, and 3 heavy support. I'm also allotted a certain amount of points per game, and I'll generally have to field one HQ and two troops selections.
We'll have to compare Opportunity Cost two main ways in 40k: force org slots and points.
Force Org Slots
Here, we're comparing options within a given force organization slot. Well, we have to have an HQ, and we have to have two troops (and will often go for at least a third, depending on the army). These are non-negotiable slots, so what we put in them is part of the army's 'theme' (in that you want something like light or heavy mech, or foot, or massed MCs, or horde, or whatnot).
Here, we're talking support. It's simple, because we can limit our comparison to the slot. This is where Haihastur started this. If I recall correctly, he's not a fan of Vindicators in the Marine codex (and frankly, I'm not either), but prefers Whirlwinds to Predators.
Well, we have 3 heavy support slots, and we probably want to at least duplicate the choice for sake of reliability/resiliency (aka, redundancy). So, we're comparing the capabilities of two potentially disparate units. We should ask ourselves:
1) What capabilities does it bring/what does it kill?
2) What does this do for the rest of my army, potentially?
3) What's the point cost?
The Heavy Bolter/Autocannon Predator is more or less the same price as the Whirlwind, so price isn't an option. We then need to ask what do they do, and what do they bring for the army. This is a nutshell example, so I'm not going to give you all a full Vindicator vs Predator comparison. Short version:
-Worry light armor w/ heavy bolters, autocannon
-worry medium armor w/ autocannon
-durable AV13-front vehicle; one more target to deal with
-worry monstrous creatures & infantry, but loses effectiveness to cover
-maim up infantry w/ S4, AP5 ignores-cover shot
-prefers to hide
-single weapon system = one damage result to gimp it.
My opinion leans towards the predator because it can do more than the Whirlwind (engage vehicles/MCs/infantry), even though the Whirly can scare lighter infantry even if it's in cover (assuming they're AP5) and can still respectably wound heavier infantry with the S5 shot.
So, let's look at Fast Attack for Space Wolves. They can bring the respectable space marine land speeder, but also have Thunderwolf Cavalry. Both need to be brought in numbers, so they generally preclude the other. Here, we're talking about something that potentially flavors the army; bringing 10-15 thunderwolvs is a hefty points investment and makes them the centerpiece of the army (and they can be a bloody scary one at that).
A tyranid example would be 2-3 Tyrannofexes versus 3 trygons. Taking Tyrannofexes means you've got a ranged shooty core to the army, whereas 3 Trygons means you're going to be in the enemy's face and that'll dictate how you build the army.
The same can easily be said for any Space Marine commander with Chapter Tactics in lieu of combat tactics, or any strong supporting HQ figure (IE: Farseers for psychic support/defense, Hive Tyrants for reserves manipulation/preferred enemy, etc.)
The other basic form of opportunity cost comes in the form of similar capabilities in different slots. This is something you'll find more of in newer codices, as this allows you much greater flexibility in terms of making an army, but complicates army building a bit since you're weighing more options. (I'll take the extra work, personally).
Let's look at the IG book. I don't know about you guys, but I like poofing infantry in great bloody swathes. Do you like that? I also like chunky spaghetti sauce, but that's unrelated.
So, if I want to KO swathes of infantry, I have several choices, including:
1) Hellhounds in Fast Attack
2) Valkyries with Missile Pods in Fast Attack
3) Multiple Chimeras w/ Hull Heavy Flamers in troops, other slots
-possibly Platoon Commands in aforementioned chimeras with flamers, too
4) Leman Russ Eradicator in Heavy Support
5) Colossus Siege Mortar in Heavy Support
All of these are capable of doing horrifically graphic things to infantry, though not all capabilities are necessarily equal.
My evaluation will also depend on what other essentially capabilities I can get in other slots, so I'm still doing some intra-slot comparison. I could take Hellhounds (which can get hull multi-meltas for some duality), which means I need to get some more reliable anti-tank elsewhere (Maybe troops or heavy support, but not Vendettas. Maybe Hydra flak tanks and meltagun squads?). Or, maybe I take the Russ Eradicators, filling up my heavy support and leaving me with the need to bring anti-tank in other slots (Maybe vendettas or melta squads?).
Wrapup: Opportunity Cost and Army Design
Basically, you need to start by knowing what your army can give you in what slots. Some armies make this simpler than others. With Eldar, I know I want to bring Fire Dragons to kill heavy tanks, because they're a solid option (...and I don't really have other good options for killing tanks). I can supplement it with S8 guns from transports and falcons, but I just don't have any other comparable punch, so the rest of my army can fall in after these choices are locked in.
On the other hand, better-designed armies can bring the capabilities in various slots. Here's where you have to do the work and take the concept of opportunity cost into account: you want redundancy so SOME of your tools live to do the jobs, so you're going to generally make one choice for the non-troops slots and duplicate it. That's why you need to get a grasp of tradeoffs.
Hopefully, this has been beneficial (or at least thought-provoking), but it seems like tradeoffs are A) a complicated part of army-building at times, and B) sometimes overlooked.