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.