The best thing would be for you to tell her.
Could you please help me identify the grammatical function of "for you"?
For you doesn't have a grammatical function on its own. It's part of for you to tell her, which is a infinitive clause: a clause that functions as a noun phrase. In particular, it's a for-infinitive, which has a subject: for [subject] to [verb]. These clauses can include more than just a verb, for example: "For the motor to spontaneously catch fire and burn the house down is impossible."
It's possible to say the same thing without an infinitive, by using a gerund clause instead: "The best thing would be you telling her." But infinitives are more likely for hypothetical future actions, so a native speaker would be more likely to say "for you to tell her".