Astronomy, as we practice it in our western civilization, came to us from the Greeks. Therefore, the planets had names of Greek gods.
When a bunch of Greeks went and founded Rome, 8 centuries BC, they adopted the local Latin language and customs, but they changed the Latin mythology, in order to make it fit their own.
Thus, the Latin god Iuppiter was given the characteristics of Zeus and slowly became the chief Roman god (the original Iuppiter was not as important as the Greek Zeus was).
And Saturnus was given the attributes of Chronos, etc.
The names used for the planets were not important for people in general, and each region had different names for them.
The whole thing began in the Middle Ages and in the Rennaissance, when scientists were communicating together all over Europe. They had chosen Latin as the common language (the same way that most scientists now write in English, whatever country they work in). Why Latin? Because science, as it was practiced then, was a creation of the Church, who also maintained this network of communications between these "centres of knowledge" (what we now call universities). And Latin was the language of the Church.
Using Latin, the astronomers therefore used Latinized versions for the planet names (even though they knew that the mythology behind the names was Greek).
As the general population became interested in planets, they simply used the same names that were used by astronomers EXCEPT for Germanic and English people who kept their older names for the objects that they already knew about: Earth, Moon and Sun.
In English:
Earth comes from an old nordic name (erd') which meant something like the home, the place where one grows food.
Moon comes from an old Latin name for the satellite (as opposed to the Latin goddess Luna, who was associated to the Greek Selene), and the old word is also the one that gave us the word "month" = a cycle of the Moon.
Sun comes from the old English Sunne, itself from an older germanic language, where it is called "sunnon". The word could come from an old verb that means to shine (but it could very well be the other way around - the verb comes from the name of the "shiny object in the sky").
Most other European languages did adopt modern names based on the Latinized versions:
Terra became Terre in French, for example.
Luna became Lune
Sol became Soleil.
In English, there are traces of these Latinized words, mainly in adjectives, such as "extraterrestrial" lunar, solar...
---
Other languages (even in Europe) have kept ancient names. For example, in Russian, the Sun is called Солнце (transliterated as "Solntse") which does seem to be a cross between the Latin root "Sol" and whatever word gave the proto-germanic word "sunnon".
---
The effect of using Latinized names, but keeping the Greek mythology became very apparent when the first planet beyond Saturn was dicovered.
Zeus (Jupiter) was the father of Ares (Mars)
Chronos (Saturn) was the father of Zeus.
When the next planet was discovered, astronomers asked themselves: who was the father of Chronos?
The answer, under Greek mythology, was Ouranos (the god of the heaven and the husband of Gaia, our Earth). So they gave the planet the name of Uranus (the Latinized version of the Greek god).