に来たの

came to do (something), came to; arrived at

→ に
phrase Very common #1,885
came to do (something) Attach に to a verb stem to state the purpose of coming; の gives the expression a conversational tone.
JA: お別れを言いに来たの。
EN: I came to say goodbye.

それだけを言いに来たの

I came all this way just to say that.

— Arrietty (2010)

お別れを言いに来たの

I came to say goodbye.

— レベッカ (1940)

今日はお別れに来たの

I came to say goodbye today.

— Arrietty (2010)

食事に来たの?

Did you come here to eat?

— 甘い生活 (1960)

上に何しに来たの?

What did you come upstairs for?

— 箪笥<たんす> (2003)

ブルースを聴きに来たの

I came to listen to the blues.

— 罪人たち (2025)

phrase Rare #32,869
came to; arrived at Used to ask about coming to or arriving at a place or time; の makes the question conversational.
JA: 君はいつ日本に来たの?
EN: When did you come to Japan?

日本に来たのはいつなの?

When did you come to Japan?

君はいつ日本に来たのですか。

When did you come to Japan?

なぜこのような時に来たのか?

Why did you come at a time like this?

— HERO (2002)

でもどうしてこんな田舎に来たの?

But why did you come all the way out to the countryside?

— When Marnie Was There (2014)

なぜ日本に来たのですか。

Why did you come to Japan?

私は偶然にリバプールに来たのだった。

I came to Liverpool by chance.