Straight from the PRD's Combat section:
Touch Attacks: Some attacks completely disregard armor, including shields and natural armor—the aggressor need only touch a foe for such an attack to take full effect. In these cases, the attacker makes a touch attack roll (either ranged or melee). When you are the target of a touch attack, your AC doesn't include any armor bonus, shield bonus, or natural armor bonus. All other modifiers, such as your size modifier,
Dexterity modifier, and deflection bonus (if any) apply normally.
And from the Magic Section:
Ray: Some effects are rays. You aim a ray as if using a ranged weapon, though typically you make a ranged touch attack rather than a normal ranged attack. As with a ranged weapon, you can fire into the dark or at an invisible creature and hope you hit something. You don't have to see the creature you're trying to hit, as you do with a targeted spell. Intervening creatures and obstacles, however, can block your line of sight or provide cover for the creature at which you're aiming. If a ray spell has a duration, it's the duration of the effect that the ray causes, not the length of time the ray itself persists.
If a ray spell deals damage, you can score a critical hit just as if it were a weapon. A ray spell threatens a critical hit on a natural roll of 20 and deals double damage on a successful critical hit.
So basically you make an attack roll (1d20), and add your Dexterity modifier. Since it's a spell with it's own range (close is 25'+5/2 levels), it uses this instead of normal "increments". No penalties for distance, but you are capped.
The defender uses his "Touch" AC to defend against your attack. Typically, this means unless the guy has a decent Dexterity score, he's going to be fairly easy to hit.
In fact, large creatures having a penalty from size modifiers, ranged touch attacks make great things to use against those "brutish big baddies" types.
This is one-half of the reasons why casters are told to have a decent Dex score. The other half being Reflex saves and AC.
So:
Ranged Touch Attack Roll: 1d20 + Base Attack Bonus + Dexterity Modifier
vs
Touch AC: 10 + Dexterity + size modifier + misc (deflection, luck, etc)
Note that you are allowed to pick up Weapon Focus (ray) if you wanted (at least, according to previous 3.5e rulings). Since it can critical too, you could potentially grab Improved Critical (ray) too.
These you might want to run by your GM though, because he might hold different feelings on this, and I believe there isn't a specific rule in Pathfinder that calls this out as legal (there was in a 3.5e supplement, Tome of Magic? Someone else will clarify, I'm sure).
Hope that helps.