As an alternative to train service, you can take a bus from Kuala Lumpur to Hat Yai. The journey takes approximately 11 hours. The reason for long hours is long queue when you reach the immigration check point. At Malaysia border (Bukit Kayu Hitam) you will have your passport stamped and board the bus again and get to Thailand border (Sadao Check Point) before boarding and continuing the ride to Hat Yai.
You can take the bus from Pudu Sentral (formerly known as Pudu Raya). There are many operators such as Sri Maju, KBES and Super Nice, just to name a few.
I posted about going to Bangkok from Kuala Lumpur by train before. As an alternative way to go to Bangkok (and a lot faster), you can take a flight from Hat Yai to BKK. Hat Yai international airport is just 20 minutes drive from Hat Yai town. There are domestic as well as international flights here.