Although this question already has an accepted answer, I feel some further clarification needs to be made.
OP rightly expressed their confusion when saying:
QUOTE (the bolds are mine)
Fue en ese momento en el que me enteré del atentado terrorista.
Maybe I'm being too literal, but I think of this as saying "It was at this moment in which that...." For me as an English-speaker, this feels like adding an extra "in which" at the end. So I'm wondering whether there is a general rule that I could think of as the "add an extra preposition and relative pronoun" rule.
If so, my guess is that maybe I can translate
It was for my friend that I worked.
to
Fue para mi amiga para la que trabajé.
UNQUOTE
Under item 1.5 of this DPD section on "que" we can read that the sentences we call "oraciones enfáticas de relativo" or "oraciones copulativas enfáticas" (Nueva Gramática de la Lengua Española) are correctly formed if a relative adverb or a relative pronoun (preceded by a preposition where needed) is used.
According to grammar rules, there has to be SEMANTIC CONSISTENCY between the emphasized element and the relative word. We thus get sentences like:
Fui yo quien llamó. (It was me who called.) (There is semantic consistency between "yo" and "quien", as both of them refer to a person.)
En esta casa es (or Es en esta casa) donde vivo. (It is here where I live.) (There is semantic consistency between "en esta casa" and "donde", as both of them refer to a place.)
Así es (or Es así) como se hace. (It is like this how you do it.) (There is semantic consistency between "así" and "como", as both of them refer to manner.)
Entonces fue (or Fue entonces) cuando supe la verdad. (It was then when I learned the truth.) (There is semantic consistency between "then" and "cuando", as both of them refer to time.)
When a preposition is used in the topicalized element, a preposition should be used in the linking element too:
Con el martillo fue (or Fue con el martillo) con lo que abrí la caja. ((*) It was with the hammer with what I pried the box open: ungrammatical in English.)
En esta ciudad es (or Es en esta ciudad) en la que hay contaminación. ((*) It is in this city in which there is pollution: ungrammatical in English.)
Fue por eso por lo que recurrí a una amiga. ((*) It was for that for which I fell back on a friend: ungrammatical in English.)
Con este convencimiento fue (or Fue con este convencimiento) con el que tomé la decisión. ((*) It was with this conviction with which I made the decision: ungrammatical in English.)
As transcribed below, DPD says: La construcción considerada más correcta exige, en estos casos (in the cases above), repetir la preposición ante el relativo, y que este lleve artículo.
However, there is an extended tendency to use "que" alone in American Spanish and in the Spanish used in Catalunya. This is called "que galicado" because this usage derives from French phrases clivées, which seem to work pretty much the same as do English cleft sentences (literally, "oraciones escindidas"):
1.5. ... En el español de América y, en España, entre hablantes catalanes, esta supresión es frecuente en las oraciones enfáticas de relativo con el verbo ser, igual que ocurre en francés, razón por la cual algunos tratadistas han denominado «que galicado» a este fenómeno: «Fue por eso que recurrí a una gran amiga de ella» (País [Col.] 19.5.97); «Con este convencimiento fue que [...] se generó un nuevo concepto de construcción industrial» (Hoy [Chile] 7-13.7.97). La construcción considerada más correcta exige, en estos casos, repetir la preposición ante el relativo, y que este lleve artículo: Fue por eso por lo que..., Con este convencimiento fue con el que... Esta construcción galicada es bastante frecuente cuando el antecedente del relativo es un adverbio de lugar, de tiempo o de modo: «Es allí que organizan y entrenan a estos grupos contrarrevolucionarios» (NHerald [EE. UU.] 28.7.97); «Fue entonces que noté, por el ardor, que tenía mordeduras en el dedo medio de la mano derecha» (Valladares Esperanza [Cuba 1985]); «Fue así que el almuerzo dominical terminó centrándose en el “caldu maní”, sopa de refinada sustancia» (Tiempos [Bol.] 9.3.97). En todos estos casos es preferible emplear el adverbio relativo correspondiente: Es allí donde..., Fue entonces cuando..., Fue así como... Similares a este tipo de construcciones son las interrogativas perifrásticas con ser encabezadas por un adverbio interrogativo, habituales en América y, en España, entre hablantes catalanes, en las cuales que funciona a modo de conjunción: «¿Dónde fue que lo vio?» (Marsé Embrujo [Esp. 1993]); «¿Cuándo fue que usted estudió a Marx?» (Soriano León [Arg. 1986]); «¿Cómo fue que comenzó esta historia?» (Universal [Ven.] 8.9.96). Es preferible, en estos casos, el uso de interrogativas no perifrásticas: ¿Dónde lo vio?; ¿Cuándo estudió usted a Marx?; ¿Cómo comenzó esta historia?