This is how Optimus Prime meets Twilight Sparkle goes in My Little Pony Transformers Prime: Friendship is Magic.
[Optimus fires up the Space Bridge to Equestria]
Optimus Prime: I will be back soon, Autobots.
Optimus Prime: Take care of things while I'm gone will you?
Arcee: We will, Optimus.
[Optimus drives into the Bridge and arrives in Ponyville]
Optimus Prime: Ponyville.
[He sees an alicorn]
Optimus Prime: Excuse me.
Twilight Sparkle: [scream]
Optimus Prime: Sorry, didn't mean to spook you.
Twilight Sparkle: It's okay. It's just that I've never seen a giant talking robot before.
Optimus Prime: And I have seen a talking alicorn.
Twilight Sparkle: My name is Princess Twilight Sparkle.
Optimus Prime: I am Optimus Prime. Leader of the Autobots.
Twilight Sparkle: Well, it's nice to meet you, Optimus. What brings you to Ponyville?
Optimus Prime: I have heard word of relics known as the Elements of Harmony.
Twilight Sparkle: Oh, I have a book about that called Predictions and Prophesies.
Optimus Prime: Really? Where is it?
Twilight Sparkle: It's in my castle.
Optimus Prime: Really?
Twilight Sparkle: Yep. Follow me.
[She takes him to her castle]