Breakdown of Me dijo que yo tenía razón.
yo
I
tener
to have
la razón
the reason / being right
que
that (relative pronoun, conjunction)
Questions & Answers about Me dijo que yo tenía razón.
Why is tenía in the imperfect tense here instead of the preterite (tuve)?
This is a classic example of reported speech. Because the main verb dijo is in a past tense, the original present-tense statement (which was likely Tienes razón - "You are right") has to shift a step back in time. The present tense shifts to the imperfect (tenía) to show that the statement was an ongoing reality at that moment in the past.
Why is the pronoun yo included? Couldn't we just drop it?
You can usually drop subject pronouns in Spanish, but here yo is used to prevent confusion. The imperfect verb form tenía is exactly the same for the first person (yo) and the third person (él, ella, usted). If you just said Me dijo que tenía razón, it could easily be misunderstood as "He told me he was right." Adding yo makes it perfectly clear.
Does Me dijo que... always trigger indicative tenses like tenía, or does it ever take the subjunctive?
It depends on whether someone is reporting a fact or giving a command. When the verb decir is used to relay information (as it is here), it takes indicative tenses like tenía. However, if decir is used to give an order or influence behavior (e.g., "He told me to be right"), it would trigger the past subjunctive.
A quick refresher: why do we use tener here instead of a verb for "to be"?