Eres most likely1 comes from the 2nd person singular future active indicative of sum, eris ("you will be").
Sois comes from the Late Latin form *sutis (formed by analogy to sumus)2:
ESTIS (re-placed by *SUTIS, analogical to SUMUS) > OSp. sodes > ModSp. sois
1. On the Origin of Spanish eres, Griffin (1994)
2. The Origin of Spanish "ser": A Phonosyntactic Analysis, Joel Rini (1997)
Note that some other tenses of ser (future indicative, present subjunctive, conditional, imperative, infinitive, past participle, gerund) aren't related to sum at all, and are inherited from the suppletion of multiple different verbs in Latin (ire, vadere, sedere).