Why does the earth have a core and can a planet exist without one?
Well, I know that earth's moon has no magnetic field, which I'm fairly certain means that it has no core. If a planet had no core, then it wouldn't deflect the solar wind or charged particles. A planet can certainly exist without a core, but I wouldn't want to live on such a planet (at least not with out SPF 10^23 sun block).
The earth has a core because the materials differentiated during its formation, the dense iron crystallised out of the melt and sunk to the bottom. The density contrast at the core-mantle boundary (CMB) is rather high, in fact it is so high that g (the acceleration due to gravity) is greater at the CMB than it is at the surface!
I don't know that much about the moon but i'm pretty sure you'll find that it has some kind of core, core generally just means it has a concentrated centre of dense material. Measurements of the moons moment of inertia will constrain this, and similar measurements have been made of Jupiter's moons showing that they all have cores of some variety. All planets probably do have cores, as to whether they can exist without one, hypothetically yes, if the material was very well mixed and there was enough internal energy to prevent differentiation, but I don't see this as a physical likelihood.
Incidentally a core here does not necessarily have to resemble Earth's core!
The presence of a magnetic field is not necessarily related to the presence of a core, the earth wouldn't have a (strong) magnetic field if its core was completely solid, unless it developed permanent magnetization which is of course quite possible below the Curie temp.
You're right Billiards. By "core," I was referring to a metallic core with enough angular momentum to produce a detectable magnetic field.
Separate names with a comma.