I think this is in Tome and Blood, but if I remember correctly you can sneak attack as long as the spell requires an attack roll and you're within 30ft and your target is denied their Dex bonus.
If the spell creates multiple rays or orbs, then the sneak attack damage applies only to the first, like a shuriken.
IceBear