Either this:
(Uses the following non-core rules: FRCS Elf Domain, FRCS web enhancement or LG Gods, Flexible Weapon Focus (S&F optional rule), Persistent Spell (T&B))
Elf cleric archer
Stats: 28 point buy and priority:
Str 12 (helpful but not strictly necessary)
Dex 16 (2nd priority for increases)
Con 12 (Con should never be lower than 12 if you can help it but isn't a huge priority for increases)
Int 10 (your dump stat--just don't go below 10 or you'll have no ranks for anything except concentration)
Wis 14 (Increasing wis is your highest priority)
Cha 10 (higher would be nice for turning checks)
Deity: Solonor Thelandira (Elf and War) or Shevarash (Elf and War)
Feats:
1. Point Blank Shot (Elf domain), Weapon Focus Longbow/Comp Longbow (War domain), Precise Shot (1)
3. Rapid Shot
6. Extend Spell
9. Persistent Spell.
Items:
Bracers of Archery, Necklace of Prayer Beads (bead of Karma), Periapt of Wisdom, Magic bow (preferably Holy or energy enhanced), Gloves of Dexterity (lowest priority--cat's grace will do this too), Magic Mithral Chain shirt (You'll eventually have enough dex to max out your available dex bonus to AC). Boots of Speed (doesn't everyone want them?)
Strategy:
Persistent Divine Favor using the bead of Karma=+4 to hit and damage
GMW on arrows using bead of Karma= +4 to hit and damage
(You could do this on your bow too but you might want more than 50 arrows. . . .)
Cat's Grace (elf domain) or gloves of dex.
Bracers of Archery=+2 to hit and +1 to damage
When you really need to deal the smackdown, use your domain spell, Divine Power and cut loose for three or four attacks/round for 1d8+18-20 (4 str, 4 arrow, 2-4 bow, 4 luck, 1 bracers, 1 PBS)+2d6 vs evil
If you don't want to play a cleric, here are a couple of other good builds:
Elf Ftr 4/Wiz2/Order of the Bow Initiate 1/Arcane Archer 1/Deepwood Sniper 1
1. Point Blank Shot, Precise Shot
2. Rapid Shot, Scribe Scroll (Wiz 1
3. Weapon Focus composite Longbow
5. Weapon Specialization Composite Longbow
6. Far Shot
9. Improved Critical: Composite Longbow
If you don't want to be an elf or half-elf:
Ftr 2/Rgr 4/OoBI 1/Templar 1 (archery god like Phaulkon (Greyhawk)/Deepwood Sniper 1
1. Point Blank, Precise, Rapid shot
2. Weapon Focus: Composite Longbow
3. Endurance
4. Ambi/TWF, Track
6. Far Shot, Weapon Specialization, Mettle
9. Improved Critical: Composite Longbow
If you don't want Templar and you'd like more options than only archery:
Ftr 4/Rgr 1/Bbn 1/OoBI 1/Deepwood Sniper 2
Of all of these, I think the cleric archer is the most effective but may need to leave off archery from time to time in order to do more effective clerical things like turning undead or healing. Of course, what that really means is that, unlike the other characters (with the possible exception of the Human non-templar), you actually have things other than archery that you're good at and if someone casts darkness or obscuring mist or solid fog, you can just break out the flame strikes, Daylights, etc.
The other builds will do more damage after they get hit with a dispel magic, however, and don't rely on feats and items the DM might nerf for being too effective--they just rely on multiple prestige class combinations the DM might nerf for being too munchkin.