“John and I” is grammatically correct when it is placed before the verb and is the subject of the sentence.
“John and me ” is only correct when “John and me” are the objects of the sentence.
John and I are going to the cinema.
The most important thing to remember is that “I” is the subject pronoun(the person that does the action) and “me” is the object pronoun(the person that receives the action. You can read more about subject and object pronouns here.
When “John and me” is incorrect
“John and me” is incorrect at the beginning of the sentence because we do not use “me” as the subject of the sentence.
People tend to make this mistake as the subject includes more than one noun but more commonly with a name such as John or Sally.
We are so used to subject(I) + verb that this structure is disrupted, it can be easy to make a mistake.
I remember being corrected as a child that it is always “my friends and I “ and finding it difficult to say this structure.
I play tennis.
Subject verb object
She loves me
John and I play tennis
When to use “John and Me ”
“Me” is an object pronoun that means that you receive the action. “
Peter punched me.
In this example, you received the punch. It doesn’t make sense to say “me punch”.
You can only use “John and me ” when you and the other person(John) receive the action.
They started a fight with John and me.
The artist painted a picture of John and me.
It is just a form of politeness to put “John” before “me”.