Which of these is correct and why?
I’d rather it be you.
I’d rather it were you.
Both are correct, and they mean different things.
"I'd rather it were you" means that it already is someone else, or assuredly is going to be someone else ("the decision has been made", "the results are in"), and my preference for you isn't expected to change anything.
"My travel partner is Dwight. I'd rather it were you."
"I'd rather it be you" means we are discussing something uncertain - an uncertain future, a tentative plan, a hypothesis, a set of critically incomplete information - and it includes the idea of "it" being someone other than you. It implies nothing either way about whether my preference for you could change things, but it does imply a possibility that it might yet end up being you.
"It seems the boss is planning to pair me up with Dwight. I'd rather it be you."
It's a good question. Both are correct. The first is much more formal sounding these days.
In English there is no true future tense. We can use "will" or we can use present tense. Thus,
"I hope you go tomorrow." (present expressing future)
or
"I hope you will go tomorrow. ('will' expressing future)
When you introduce 'rather' you also add the English subjunctive. You can see the tenses used by adding a sub-clause.
"I'd rather it be you that goes tomorrow." (present subjunctive)
"I'd rather it were you that went tomorrow." (past subjunctive)
Both seem to be correct whereas I'd rather it be you seem a little bit off use rather than another. I'd rather it were you is just the same construction as I wish I were you which nowadays can be replaced by I wish I was you.
"I'd rather it be you" sounds American to me, British rarely uses the subjunctive anymore. "I'd rather it was you" would sound the most idiomatic.