西瓜（すいか）is a Japanese word, borrowed from the Chinese. It is not known exactly when watermelons arrived in Japan, though it was most likely after the Muromachi period (1333-1573 CE). Words which are native to Japan, borrowed from China, or borrowed a long time ago tend to be written in Kanji and Hiragana. Incidentally, 「西」means west and 「瓜」means melon or gourd.
メロン on the other hand is an imported word from the English melon. This word refers to Muskmelons which were imported in the late Meiji (1868-1912 CE) or early Taisho (1912-1926 CE) periods. Words which are not Japanese or Chinese in origin are often written in Katakana.
Normally, melons which were passed to the east of the Middle East contain the kanji 瓜（うり）and melons passed to west of the Middle East contain the word メロン.