As @mxyzplk said, you will need to deny your opponents their Dexterity bonus to AC.
Here are some ways to do that at range (sorry about the length):
Force them to Balance
Opponents are flat-footed while Balancing unless they have 5 ranks in Balance in 3.5 (or just always, regardless of their Acrobatics skill in PF, if I recall). The Grease spell works well if you have a mage handy, marbles (from the Arms and Equipment Guide) are a cheap mundane alternative. This is a low-level tactic that fades in usefulness as more enemies start flying.
The standard Invisibility spell and the associated ring only work for one attack, Greater Invisibility is better. The easiest ways to get Greater Invisibility are usually asking a friendly mage, obtaining a wand (use your Use Magic Device skill!) or prestige/multiclassing into a class that offers it, like Assassin.
The Hide rules are odd, but they can get the job done. Forget that Sniping option, it's redundant due to this line:
It’s practically impossible (-20 penalty) to hide while attacking, running or charging.
So just do the impossible. Pump up your Hide skill and hide while attacking. You will most likely need to find some way to get a Hide in Plain Sight ability (depending on the version you use, you may also need a way to generate cover or concealment), in core, the Shadowdancer is probably the best. Outside of core, you have things like the Dark template (Tome of Magic) to do it more easily.
In any case, this is a powerful option if you are good at increasing your skill check modifiers. Particularly, this can work even against foes with True Seeing (which foils Invisibility). If you take the Darkstalker feat (Lords of Madness), it foils several common anti-hide special abilities too.
The Blink spell denies your opponents their Dexterity bonus to AC. This is useful because there is a handy ring that grants the spell, even if it comes with limitations.
Blinking works best when combined with the Pierce Magical Concealment feat from Complete Arcane, to negate your own miss chance.
Other: Specific Sneak Attack enforcing options
There are ways to deliver Sneak Attack damage outside normal limitations (the target needing to be flanked or denied Dexterity bonus). The most effective ones I know are:
- The Hunter's Mercy (Spell Compendium) or Surge of Fortune (Complete Champion) spells combined with the Telling Blow feat (Player's Handbook 2)
- The Wracking Touch spell (Spell Compendium)
These may be difficult to fit into a build, but they can be effective.
There are also things like the Arcane Trickster's Impromptu Sneak Attack, but that's a limited ability of an unimpressive class.
Other: Flank anywhere
The Clarion Commander tactical feat (Tome of Battle) has this option:
you make a DC 20 Intimidate check against an opponent as a standard action. If this check succeeds and you make a successful melee attack against the same foe on your next turn, you and your allies can treat that enemy as flanked for 1 minute.
This unusual wording allows anyone to flank without the usual setup. Assuming no argument is made about it simply not being possible to take advantage of this "flanking" with a ranged weapon, it allows a Rogue to Sneak Attack from range without denying Dex.
So, if there's someone in your party who is likely to get in a melee attack in the first round of each combat (even if that is the Rogue) and that someone can be convinced to take this feat, the Rogue is set.
Do not recommend: Grapple
While it may be tempting to pair up with a big bruiser and have them grapple opponents while you pepper with ranged attacks, the strategy becomes awkward in practice. At low levels, you will not have the Improved Precise Shot feat, so shooting into a grapple will be a dangerous game. At higher levels, monsters with enormous grapple check modifiers and/or Freedom of Movement effects become rather too common for grappling to be a reliable strategy at all.