If you target one creature and that target is illegal as Repel the Darkness resolves, the spell doesn't resolve. You don't draw a card.

Artwork
Loading artwork…
Repel the Darkness
Foundations Jumpstart · #242 · EN
Nonfoil—Foil—
Card rules
Tap up to two target creatures.
Draw a card.
A boon to those who cannot see in the dark. A bane to those who live in it.
Common · Illustrated by Scott Chou
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
Penny Legal
PreDH Legal
Timeless Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Pioneer Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
If you target two creatures and they're both illegal as Repel the Darkness resolves, the spell doesn't resolve; you don't draw a card. If just one target is illegal, the spell does resolve; the remaining legal target becomes tapped (if it's untapped at that time) and you draw a card.
You may target zero, one, or two creatures. The creatures don't need to be untapped.
If you target zero creatures, all that happens is you draw a card.