Player A has 1 Sand Soldier in BF and 3 Sand Soldiers in base. Player B plays Piercing Light with Repeat, but chooses the 1 Sand Soldier in the BF twice. Would Piercing Light stop working after the first cast since Sand Soldier in BF dies?

No, Piercing Light will not stop working.

According to RiftJudge FAQ #9063, #6490, and #8976, Piercing Light with Repeat is treated as a single, all-in-one spell resolution. The spell performs its instructions twice during that single resolution, and no cleanup (which would remove units from the board) occurs between these two executions.

Here is the sequence of events:

  1. Playing the Spell: Player B plays Piercing Light, pays the Repeat cost, and declares all targets for both executions of the spell. In your scenario, they have chosen the Sand Soldier at the battlefield as the target for both the first and second execution.
  2. Resolution: The spell begins to resolve.
    • First Execution: The first instance of 2 damage is dealt to the Sand Soldier at the battlefield.
    • Second Execution: The second instance of 2 damage is dealt to the same Sand Soldier at the battlefield.
  3. Cleanup: Only after the entire spell has finished resolving (both executions) does the game perform combat cleanup. Any units that have taken lethal damage are then sent to the trash.

Because the unit at the battlefield is not removed from the board until after the entire spell has finished resolving, the second execution of the spell proceeds normally and successfully deals its damage to the target, even if the first execution dealt lethal damage.