I have analyzed your sentences below and shared with you some of the tricky things to look out for as an English speaker learning Spanish.
He dado el café a tu novio. [dar algo a alguien]
I gave the coffee to your boyfriend.
Le he dado el café a tu novio.
That's right but the le is optional (in speech).
Se he dado el café a tu novio.
No, this one is not right because that would make it darse and give something to someone (dar algo a alguien) is not reflexive.
To say "I have given it to him", it has be:
Se lo he dado (a tu novio). Why se? Because lelo is not grammatical in Spanish.
HERE ARE most of the uses of darse (pronominal in Spanish): as opposed to dar algo a alguien, and their English meanings (translations mine).
prnl. Dicho de una cosa: Suceder, existir, determinar. Se da el caso. En circunstancias dadas. to happen or occur
prnl. Dedicarse con entusiasmo a algo o a alguien. Es un médico que se da A sus enfermos cada día. to dedicate oneself to, to give of oneself
prnl. Entregarse a algo con desenfreno. Se dio A la bebida, A las drogas.
to put oneself into something or to put all one's energy into something.
prnl. Ejecutar determinadas acciones mentales. Darse A creer, A imaginar. to imagine
prnl. Cineg. Dicho de las aves que van volando, o de la caza: Pararse de cansadas, o caer en algún sitio o lugar. to stop from or due to exhaustion; to flop or to alight. [context would be telling here, anyway its about hunting]
- Lo he dado a tu novio. [Right]
I gave it to your boyfriend. lo is direct and a tu novio is the person to whom it is given. There is no indirect pronoun there.
Los periodistas escriben la carta a ella.
The journalists write her a letter. [ a letter to her]
- A ella le escriben la carta. [Yes, but the a ella is usually at the end.]
*Le escriben la carta *a ella.**.
If you wish to make clear, it is a woman, you need a ella, or to make clear it it is a man, a él. If you use: Le escriben la carta, which is grammatical, the speakers are assumed to know whether it is a man or woman or it doesn't matter which they are. Also, you can leave off the le in informal speech.
- A ella se la escriben.
They registered her. [escribirse, reflexive, la, for la lista for example]
A ella le lo escriben. NO, no lelo in Spanish.
Lo escriben a ella. Yes, but it is no longer la carta. Lo could refer to some content or other in the letter. They write it to her. Also, escribirse can mean to register or sign up. BUT: here you are using escribirse and it has a different meaning (RAE): 5. prnl. Inscribirse en una lista de nombres para un fin. So it means to sign up or register.
A ella le lo escriben. [no, A ella se lo escriben, see above: escribirse, lo has to refer a masculine noun]
Lo escriben a ella. Yes, They write it to her. The lo has to refer to a masculine noun for example. Can't think of one right now. Could refer to content of a text.
Here is what you need to remember: not to confuse reflexive verb (verbos pronominales) like ducharse or liberarse that must be reflexive and those that can be reflexive and thereby change their meaning. One of the cases that is very common is the verb hacer (and with dar, as we have seen). Hacerse and hacer do not mean the same thing at all.
Here's how the Real Academia says this:
hacer(se). 1. Como transitivo, significa, básicamente, ‘producir o fabricar’ y ‘realizar o ejecutar’; como pronominal, ‘convertirse en algo o llegar a ser algo’ (Se hizo médico) y ‘fingir ser algo’ (Se hizo el muerto); como intransitivo no pronominal, con un complemento con de, ‘representar un papel’ (En la obra hacía de reina) y con un complemento con por, ‘procurar hacer algo’ (Hizo por venir, pero no llegó a tiempo); y como intransitivo pronominal, con un complemento precedido de con, ‘apoderarse de algo’ (Se hizo con el bolso), y con un complemento precedido de a, ‘acostumbrarse a algo’ (Pronto se hizo a su nueva casa).
Translation (mine): hacer(se) 1. As a transitive verb it basically means to produce, fabricate/manufacture and carry out (perform) or ejecute. As a reflexive verb, it means "to become or come to be something.
(He became a doctor. Se hizo médico.) and pretend to be something. (He pretended to be dead. Se hizo el muerto).
As an intransitive, non-reflexive verb as a complement with de, it means to play a role. (In the play, she played the queen. En la obra hacía de reina) as a complement with por, ‘to try and do something’ (He tried to come but didn't arrive in time. Hizo por venir, pero no llegó a tiempo);
and as a reflexive intransitive verb, as a complement preceded by con, ‘to take (over) something or take control of something’ (He took the bag. Se hizo con el bolso), and as a complement preceded by a, to become used or accustomed to something’ (He quickly got used to his new house. Pronto se hizo a su nueva casa).
When you get a lelo or los or lela ou las, you use se to replace the le:
Le doy [a él o a ella] el periódico todos los dias.
If we want to say: give it to her, that would give us lelo so we use "se lo."
Se lo [a ella] doy todos los dias.
And you have to know exactly what verb is being use (transitive or reflexive) because that can change the meaning completely. I think I gave some standard examples above of this.
The indirect object is le and the direct object is lo. This would give us a lelo, so se lo is used.
What I would do is take a bunch of examples (from here and elsewhere) and write down the Spanish with English in parenthesis. Then, I would repeat those every couple of days.
That helps to internalize some of these uses. The verb decir and hacer are particularly thorny.