Melting point of a compound is first related with nature of bond. The compounds having ionic bond will have high melting point. The covalent compounds having only Vander Walls force of attraction between them will have less melting point and boiling point.
Out of the compounds having same type of bond (Covalent bond) the melting point is directly related with molar mass. This is because the Vander Walls force acting between covalent molecules is directly related with molar mass. So out of the organic hydrocarbons methane is having least melting and boiling point while hydrocarbon with 24 to 30 carbons will have relating high melting point.