True, it depends on context and what you want to emphasize. Things you want to emphasize usually start the sentence, but intonation(?), a vocal emphasis is also used. ( to demonstrate, i'll put the emphasized word between '..' -s.) Péter eszik egy almát (no emphasis, neutral sentence) 'Péter' eszik egy almát (emphasis is on the person) Péter 'egy almát' eszik / 'Egy almát' eszik Péter (on the object being eaten) Péter 'eszik' egy almát (on the action, that he's eating, not e.g. drawing one) Péter 'egy' almát eszik (on the quantity, he's eating only 1, not more)
Though, as a native speaker, "Eszik egy almát Péter" doesn't sound natural to me, and I wouldn't use it normally. However, there is one case I can think of right now, when I would use it, which is this: "Eszik egy almát Péter, aztán indulhatunk" (= Peter eats an apple, then we can go/leave). In this case, the emphasis is on the sequence of actions. First he eats one, and then we can go
This is a good question. I spent a couple years in Hungary, so I got a lot of practice trying different word orders. I believe that word emphasis comes into play with this. In English we emphasize by the way we say a word in a sentence, giving more stress to the word. In Hungarian, I believe it is the word before the verb that gets emphasis.
"Eszik egy almát Péter" sounds very unnatural to me, I can hardly think of an example for using such a word order - could you provide some context for this example, please? I can imagine saying "Eszik egy almát" where the subject is omitted, however it would still be at the beginning of the sentence, "(Péter) Eszik egy almát", respecting neutral SVO word order.
For example: "Mindennap eszik egy almát Péter mielőtt elindul a suliba." or "Eszik egy almát Péter amikor kijön a boltból." or "Eszik egy almát Péter, hogy egyen valami gyümölcsöt is." or "Azért eszik egy almát Péter, mert már nagyon éhes." These are absolutely natural to me. In my opinion, the main point is what the sentence wants to express or emphasize.