I got a telegram from my parents telling me to come home immediately.

Literal

Parents [from-から] immediately return [command-と] telegram [subject-が] came.

帰れと is a direct command (imperative 帰れ) marked with the quotative と — 'saying: come back!' 電報が来た (a telegram came) is a natural Japanese phrasing where the message is the grammatical subject. A somewhat dated scenario — telegrams are historical.