The atoms
in sodium metal are held together by the electrons that move between the
atoms - if you recall the "electron sea theory", these electrons are pretty
much free to go wandering through the whole solid. However, in the
case of sodium, this isn't very strong, and it only takes a little bit of
heat to move the atoms away from each other.
In chlorine, the melting point is even lower because the molecules aren't
even bonded to each other - the only thing that holds them next to each other
are very weak Van der Waals forces. Again, this weak force is easy
to break, causing a very low melting point.
Sodium chloride, on the other hand, is an ionic compound. This means
that both the sodium and the chlorine are present in the form of magnetically
charged ions. Because there are an awful lot of ions all stuck next
to each other, and magnetic forces are very strong, the melting point of
sodium chloride is much higher.