When I cast Lightning Arrow and roll a critical hit, does the target take 8d8 lightning damage? And does the splash damage to creatures within 10 feet of the target change to 4d8?
8d8 damage to primary target, normal splash damage
Make the attack roll as normal. The target takes 4d8 lightning damage on a hit, or half as much damage on a miss, instead of the weapon’s normal damage.
On a critical hit, you get to roll all of the attack's damage dice twice. All the spell is doing is replacing the normal weapon damage with the damage indicated by the spell. Nothing in the spell would exclude this damage from being able to be multiplied by a critical hit.
Jeremy Crawford confirms that spell attacks function just like normal attacks for the purpose of critical hits:
Spell attacks and weapon attacks both have a chance of scoring a critical hit.
And thus they follow the normal rules for critical hits:
When you score a critical hit, you get to roll extra dice for the attack's damage against the target. Roll all of the attack's damage dice twice and add them together. Then add any relevant modifiers as normal.
Thus the primary target of the attack will take 8d8 damage.
However, the splash damage is based off of a separate roll (a saving throw) and thus is a separate source of damage.
Whether you hit or miss, each creature within 10 feet of the target must make a Dexterity saving throw. Each of these creatures takes 2d8 lightning damage on a failed save, or half as much damage on a successful one.
This means that this damage does not get multiplied from the critical hit from the first source. Per Jeremy Crawford:
Damage that is associated with a save (whether you succeed or fail) isn't affected by a critical hit.
So the other creatures would take 2d8 or 1d8 damage depending on if they failed their saving throws or not.