That's a simple and insightful question, and one that requires a bit of a complex answer I'm afraid.
First, realize that the design intent in GW is that players are supposed to construct teams, not builds. You're not allocating 8 skills, but 64. At least that's the idea. No doubt, fixed-build henchmen, moron PUGS, and even moron alliancemates can put a significant crimp in that plan. Still, stick to the general concept that the team as a whole needs to cover all the bases, and any given member only needs to cover a few.
Second, let's go over the bases that the team needs cover.
In the most general way of looking at it, GW has 3 primary mechanics: damage, damage prevention, and healing. All of these are "must haves."
Then there's another 4 secondary mechanics worth paying attention to:
"Resource" skills help you meet the energy/adrenaline/activation-time/recharge-time costs of your primary-mechanic skills more easily. Since most of the primary-mechanic skills in GW are downright terrible, it's generally better to load up on a couple of excellent primary-mechanic skills and support them with resource skills that allow frequent usage than to fill out the bar with redundant-but-inferior primary-mechanic skills.
"Disruption" is essentially the opposite of whatever you disrupt. Disrupt a damage skill, and you've achieved that much damage prevention. Disrupt a damage prevention skill or healing skill and you've done the equivalent of that much damage. (Describing the ultimate effect of disrupting secondary-mechanic skills is a bit more complicated.) The value of disruption scales with the potency of your foe's skills.
"Removal," like disruption, is essentially the opposite of whatever effect it removes. This can be a little confusing because the conditions and hexes that you're removing can have hybrid effects. Removing bleed or Conjure Phantasm is essentially damage prevention; and removing blind is essentially doing damage; but what function do you accomplish by removing Guilt? Removal, again like disruption, scales in value depending upon how potent the conditions/hexes your foe has.
Finally, there's rez. You know what this is for.
So that's what's available, now how do you put it together into a team?
Generally you need offense, damage prevention, and healing, with adequate resource skills to support them. Disruption and removal aren't always necessary, but they tend to be in areas of PvE with significant challenge and reward. Rez is optional, but usually recommended.
A strong offense is usually a synergy thing. While you can take 6 or so reasonably decent damage dealers, toss them together and call it a day; you can get far better results by piecing together an offense from parts of several team members' builds. The dominant offensive strategy right now could be called "makes lots of packets and stack lots of buffs." The general concept is for physical damage dealers to generate a large number of damage packets, while midline casters buff the amount of damage those packets do.
(Here's an example of a 5-man offense that highlights the "makes lots of packets and stack lots of buffs" concept: 2 warriors with Hundred Blades, Whirlwind Attack, and an increased attack speed stance generate lots of damage packets. 1 minion master generates minions that generate lots of damage packets. 1 buff bitch N/Mo buffs the packets generated by the warriors with Order of Pain, Great Dwarf Weapon, and Strength of Honor. 1 curse necro buffs the damage packets from the warriors and the minions with Barbs and Mark of Pain. The minion master buffs his won minions with Order of Undeath, and buffs warriors and minions together with Ebon Battle Standard of Honor.)
Until recently, "throw lots of big AoE caster damage" was also a top-flight offensive strategy, but the key skills were all nerfed. It still survives in degenerate tank-n-spank teams though.
Damage prevention comes from 3 general sources, usually simultaneously. Physical attackers generate enough adrenaline to power the warrior skill Save Yourselves, which is hugely overpowered. Midliners toss debuffs at foes to reduce their ability to deal damage. And backliners cast damage-preventing buffs on team mates.
Healing is mostly a backliner task. Although sometimes midliners will run diffuse clean-up heals (like Dwayna's Sorrow on minions, or a number of skills from the Motivation line).
Disruption generally comes from knockdown on the physical attackers, dazed from a ranger (who is usually brought mainly for that purpose), or technobabble a mesmer skill on a midliner.
Removal can be distributed between the backline and the midliners depending upon who has space.
Quick activating rez is needed on a couple of midliners or physical attackers -- people who are not likely to be first to die, and likely to be able to afford the spare moment to cast rez. Everyone else should bring rez scrolls on the off chance that they somehow escape when all the rezzers are dead.
Third , if you take the the requirements for the tasks the team has to accomplish and turn them on their side, you can get a general picture of what individual builds need to accomplish:
Physical attackers need to (1) contribute to the team's damage combo (usually that means IAS + attacks that generate lots of packets), (2) prevent damage by spamming SY!, (3) disrupt, (4) maybe rez, and (5) bring the resource skills to make sure they can do those things well.
Midliners (collectively - this is far too much for 1 build) need to (1) contribute to the team's damage combo (usually that means buffs), (2) prevent damage via debuffs, (3) maybe provide diffuse healing, (4) maybe disrupt, (5) maybe do removal, (6) rez, (7) bring the resource skills to make sure they can do those things well, and (8) maybe bring resource skills to help others (Blood Ritual, Dark Fury, etc.).
Backliners need to (1) prevent damage, (2) heal, (3) maybe do removal, and (4) bring the resource skills to make sure they can do those things well.
For a more detailed picture of how to flesh out these generalities in the context of a specific class, you should visit that class's forum.