Getting sneak attack at range IS hard, don't doubt it. While Use Magic Device is handy, oftentime you'll want to be a mage multiclass yourself or have a caster ally to help out ultimately. Ring of Blinking also works, super expensive as it is...
Grease: If they're balancing, they lose dex to AC.
Grappling: Lose Dex to AC. Note that without Improved Precise Shot or similar, you do NOT want to shoot into a grapple, though. Unless it's a situation where you don't mind hitting your "ally," like with an Evard's Black Tentacle spell. Then it's just an annoying 50% failure rate.
Blinking: Makes enemies flatfooted. Later on, Greater Blink (level 5 spell) removes the drawback from the spell entirely.
Going first / surprise rounds: Until an enemy acts, he is flatfooted.
Invisibility / Greater Invis: Unless the enemy can see you somehow (sensing your location with Blindsense or Tremorsense doesn't cut it), he loses dex to AC. Grab the Darkstalker feat (Lords of Madness; no prerequisites) to deal with things that CAN see you while invisible.
Blinding enemies: Basically the last thing, just in reverse. Could also involve fighting in the dark if you have darkvision and they don't, or attacking from outside their vision range but within yours if you have lowlight vision and there's only specific light sources.
So...yeah. Ranged sneak attack is tough to get, and most of the means to get it involve spells. If you can be lucky enough to catch an enemy climbing (unless it has a climb speed listed) or running (unless it has the run feat), you can plink them for sneak attack damage, also.
3.0's Song and Silence had the awesome Quicker Than The Eye feat, to basically always get one ranged sneak attack per round if a full attack SA isn't an option, assuming you make the skill check. I always try and see if the DM will allow that in, as it helps a lot. If not, the PH2 feat Deadeye Shot is sort of similar, but IMO inferior. Instead of a move action to leave the foe flatfooted to your next attack, it makes you ready an action to shoot someone who's just been struck in melee and catch him flatfooted. I don't like having to delay your action like that, there's no guarantee anyone on your side WILL hit in melee the following round, and there's a chance that any who do will kill the target anyway.