It also depends on whether you're trying to aim for any prestige classes, and if yes, which ones.
In terms of game mechanics, the best archer would probably be a Fighter with enough Ranger levels to qualify for some kind of optimal combination of Order of the Bow Initiate, Deepwood Sniper and Peerless Archer.
But a Fighter 4 / Rogue X can also be absolutely devastating...
In terms of game mechanics, the best archer would probably be a Fighter with enough Ranger levels to qualify for some kind of optimal combination of Order of the Bow Initiate, Deepwood Sniper and Peerless Archer.

But a Fighter 4 / Rogue X can also be absolutely devastating...