Yes, you can buy bus tickets online for Colombo to Kandy on Magiya.lk.