I was operated on my left eye a month before.
or,
I was operated on in my left eye a month before.
Are both the sentences grammatical or the second one is wrong?
I was operated on my left eye a month before.
or,
I was operated on in my left eye a month before.
Are both the sentences grammatical or the second one is wrong?
Let's look at this simplified active clause:
Somebody operated on me.
In this context, operated on means 'performed surgery on'. To make it passive:
Our sentence ends up looking like this:
I was operated on [__]
by somebody.
In this sentence, the object of the preposition on is now a gap, an empty space where its object used to be before it was moved to the beginning of the sentence. I've written the gap with the special symbol [__], although it would not usually be written down. It is not possible to fill this gap; in terms of meaning, it's as though I/me is still there, following on.
Now let's go back to our active example, but this time we'll add in the adjuncts in my left eye and a month before:
Somebody operated on me in my left eye a month before.
This sentence is fine. As you can see, my left eye is not the object of the preposition on. The object of the preposition on is, of course, the pronoun me. Rather, in my left eye is a preposition phrase functioning as a locative adjunct.
Now let's make it passive again:
I was operated on [__]
by somebodyin my left eye a month before.
This sentence is fine as well. However, without the word in it becomes ungrammatical, because my left eye can't function as a locative adjunct by itself. It needs a preposition to do so.
*I was operated on [__]
by somebodymy left eye a month before. (ungrammatical)
As you can see, my left eye can't possibly be the object of on. It needs the preposition in to be a grammatical part of this sentence. That's why your first example is ungrammatical.
In this answer:
First, operated on usually stands by itself.
I was operated on (in the hospital).
where operated on refers to the person (I), not the body part. Other information like location can be added.
When referring to the body part, you can say:
The operation was on my eye (foot, knee, etc.).
I had surgery on my eye (foot, knee, etc.).
in wouldn't be used unless referring to some activity inside a body part.
The first sentence is definitely wrong, as concatenating the two phrases "I was operated on / my left eye" doesn't scan correctly.
The second one is better, as the preposition forms a transition between the phrases, but it's still longer than necessary to convey the intended meaning.
Here's a better rephrasing of the whole sentence:
My left eye was operated on a month ago.
Alternatively:
I was operated on a month ago, in my left eye.