Water contains more electronegative oxygen. Hydrogens bonded directly to oxygen atoms gets partial positive charge which means the electron density on hydrogen atoms has decreased and a partial negative charge forms on oxygen atom. This partial negative charge on oxygen and partial positive charge on hydrogen attracts each other and forms intermolecular force called Hydrogen Bonding.
H₂O ------ H₂O ------- H₂O
The dashed line show hydrogen bonding.
In case methane hydrogen atoms are bonded to Carbon atoms and there is very small electronegativity difference between them, hence, fails to form partial positive and partial negative charge, hence, no hydrogen bonding. Such non polar compounds obtain special type of intermolecular interactions called London-Dispersion Forces which are weaker compared to Hydrogen bond interactions.
Result:
Water exist as liquid due to strong Hydrogen bonding between water molecules, while, methane lacks such interactions.