"I wish her a good night."
Translation:Le deseo una buena noche a ella.
"le is the indirect object for masculine and feminine objects, which answer the question 'for whom, or to whom. La and Lo are the two direct object pronouns answer the question what or Who receives the action.
You can start reading here:
In Spanish when you have an indirect object which is a person you MUST include an indirect object pronoun (le or les) before the verb. Here are two more examples: 1) Marie gives a banana to the baby. (Maria le da un plantano al bebe.) 2) Jose gives a kiss to his daughter. (Jose le da un beso a su hija.) Also, the verb "decir" demands an indirect object because it's an "exchange verb" as one book called it. There are about 25 exchange verbs (most common are comprar, contar, dar, decir, escribir, mandar, pedir, regaler, servir, traer, leer) which take indirect object pronouns. "Le deseo una buena noche" is a strange sentence because without "a ella," no one knows to whom you wish good night. The "a ella" clears it up, but it is optional.
There's a list at https://quizlet.com/29966116/spanish-exchange-verbs-flash-cards/
I could not tell whether they meant, in saying "I wish her a good night," that they were actively speaking to her, saying "have a good night," or that they were simply thinking or talking about her and hoping she would have a good night. You could say either thing in English. In Spanish, would these two situations have two different verbs?