40K Army List Building, Part 2 - Unit Roles =====================================
Defining a unit's role in an army list is as simple as asking "which of the armies roles does this unit support?" (see 40K Army List Building, Part 1 - Army Roles). If the unit is a anti-horde unit and you've already got that need covered, then maybe you should look at other options.
Primary vs. Secondary Roles ------------------------------------------------------------
I should note that every unit in the army should have a primary role. Most will also have one or more secondary roles. This could be something the unit can do once it's primary function is complete. It could also be something it will only do if other elements of the army are unable to complete their roles.
Example 1: A space marine tactical squad might be tasked primarily with holding a "home" objective. Equipped with a lascannon, it will have a secondary role against monsters/heavy armor. Their bolters also make them a threat to light infantry that would threaten their objective.
Example 2: Fire dragons melta guns are heavy armor and monster killers. In a pinch, they can be used against heavy infantry. They have few shots, but odds are they will knock a few marines down.
Mixed capability ---------------------------------------------------------------------------
When building an army, it can also be beneficial to mix in various means of meeting the roles. For example, an IG army may contain lascannon teams for long-range AT firepower and have special weapon squads with melta guns. The meltas will generally be more effective, but are harder to get into position. Against a fast eldar or blood angels army, the melta gunner would be hard pressed to get into the fight. Against kan-wall orks, however, the meltas would provide a deterrent to the advancing walkers. Long-range capability can provide incentive to force an opponent to close. An assault unit can deter an opponent from being aggressive.
Some armies have a harder time of this than others. Tyranids, for example, will be hard-pressed to destroy tanks except at close range or in melee.
Note on Counter-Assault -------------------------------------------------------------------
Not all players will want to build close combat into their army. There are assault armies out there, though, and odds are they will close with you sooner or later, so don't ignore the possibility. Yes, even Tau should build in a plan to deal with assault. The plan might be to include a sacrificial unit or two that can tie up an assault for a turn or two while the rest of the army pulls back.
The Augmenter Role ------------------------------------------------------------------------
It is possible for there to be units in the army that don't have a primary role from the Army Roles list. There are units whose primary purpose is to increase the effectiveness of other elements of the army. The prototypical augmenter is an Eldar Farseer. He does very little damage in his own right, but he can make the units around him far more dangerous. A unit of dire avengers is a good horde-killer, with a possible 32 shots a turn with Bladestorm. However, combined with the Farseer's psychic powers Guide (re-roll misses) and Doom (re-roll failed wounds) they become a holy terror that puts out enough wounds that even Terminators will start to fail some saves.
Example 1: Farseer, as above. His secondary role could be to destroy tanks or dreadnoughts with his witchblade.
Example 2: A marine Chaplains greatest ability is the ability for his unit to re-roll missed to-hit rolls on the turn they charge. He has too few attacks to make much difference in his own right, but a unit of assault marines or lightning-claw termies re-rolling to hit can be brutal.
There are also a number of lightly armed transports that make little impact on the game except to augment the capability of the unit to which they are assigned. A Rhino's storm bolter isn't scary, but if it rolls up and drops a unit of marines onto an objective on turn 6 it could prove to be decisive.
Pulling it Together --------------------------------------------------------------------------
In short, this whole discussion is about balance. Ideally, there would be at least two units whose primary role meets each of the armies needs. Point limitations, however, often make this impossible. This is where units' secondary roles come in. If a marine army is short on AT firepower, it might benefit to add power fists or combi-meltas to a couple Tactical Sergeants. This won't make the unit a tank-killer if it isn't already, but gives them a secondary AT role to offset the armies weakness.
It is also possible to have and army role with for which no units are primarily assigned, but to cover it with secondary roles. The most common would be the anti-heavy infantry role. Instead of taking plasma guns to kill terminators, one might simply plan to swamp them with wounds from small arms and flamers. It's a risk, but awareness of the risk allows one to be prepared.
Please let me know if this is helpful. If nobody is interested, I'll stop wasting time writing these. As always, if my rambling is unclear, I would be happy to explain further.