I was wriiten.
It was written to me.
I think second one has meaning. I have been taught both are same meaning. Is it right or wrong?
I'd suggest that inside the US you need the "to" as well.
There's a difference between "I was written" and "I was written to by my girlfriend."
I neglected one of the original sentences.
To whom was this note written?
It was written to me. -- This sentence is fine.
I'm not a teacher, but I write for a living. Please don't ask me about 2nd conditionals, but I'm a safe bet for what reads well in (American) English.