The best archer? That's a tough one. Of the WotC PrCs, we've got the Arcane Archer, Order of the Bow Initiate, Deepwood Sniper, Peerless Archer, and the Heartseeker (a dragon fighting variant of the Arcane Archer). Some might also consider Sean Reynold's Serpent Archer as a bit more official than archery-focused PrCs from other designers. In 20 levels, you can't get all the best benefits from these PrCs, so you'll have to pick and choose.
Which is better, the Arcane Archer's free +5 enchanted arrows (stacked with a magic bow, that's pretty powerful), or the sneak attack damage of the Bow Initiate and the Peerless Archer? The Bow Initiate specializes in close range combat, while the Deepwood Sniper specializes in long range combat. Which is better? Clearly, it depends on the situation.
I'm also interested in what combinations people can come up with.
One character idea I had was to create an Arcane Archer that took several Wizard levels, in order to maximize the Imbue Arrow ability. With the hit you're taking in BAB due to the Wizard levels, this isn't really the most min-maxed of characters. But some of the low-level spells work really nicely with Imbue Arrow. The character becomes something like a mystic version of Hawkeye or Green Arrow.
Grease Arrow - make any 10 foot square within range slippery
Obscuring Mist or Fog Cloud - smoke arrow
Web - glue arrow
Stinking Cloud - gas arrow
Dispel Magic - disruptor arrow
Darkness - blackout arrow (Note: you don't need Imbue Arrow to do this)