I'm not talking about Scorching Ray into/underwater but other Ray attacks like Acid Arrow, Ray of Exhaustion, Ray of Enfeeblement, etc...
Shooting someone who is under water gives them +8 Improved Cover Bonus to their AC. But what if both are underwater?
Situation: On a boat a monster approaches. Attacks from range with Ray attacks. Now creature grabs caster and drags him underwater. Grappled with the creature. Creature lets go underwater. Attack with Rays.
There are a number of opinions on the subject. However:
RAW, you only suffer the normal penalties to attacking while underwater, being distracted, and/or taking damage (if drowning).
Optionally, you can add additional penalties as follows:
1) Motion (vigorous/violent)
2) Wind effects (things get swept up in water more easily than in air)
3) Visibility issues if the water isn't pristine
4) Penalty for spells with somatic components
5) Deaf rules (50% failure) for spells with auditory/verbal components
Finally, if you want to be truly irritating and come up with random physics-based house rules on the fly. Examples include:
Index of refraction for rays. ("Sorry, Gorthruk. I really was aiming at the enemy.")
Treat ranged attack spells (that aren't true rays) just like any other ranged attack underwater - if it's not a harpoon, it's worthless, and even if it is a harpoon, it doesn't go far.
Elemental lightning attacks deal less damage, but change into area attacks.
(Liquid) Acid elemental damage works the first round, but is dilute the second round.
Elemental Sonic deals twice as much damage, and carries twice as far. I advise against this, as this gives sonic even more of a ridiculous advantage.
Fire rays and cold rays are typical strength. Fire area of attack and cold area of attack are generally worthless, unless the cold area of attack specifies ice as a byproduct.
Goop rays (entangle abilities) generally work - it's your discretion to allow them to float/sink/be neutrally buoyant.