Trains could be late anywhere in the world, but some countries seem to be more punctual than others.
Are the intercity trains in Sri Lanka generally close to on time? Or habitually hours late?
I spent a month in Sri Lanka this year and took a few trains while there. All were on time arriving and departing. However, this is anecdotal evidence and not really much use to you. I would guess that I was just lucky based on statements such as this: "Issues of travel time, reliability, and comfort caused it to lose much of its market share of passenger transport. By 2011, its share of the market was only seven percent." (http://en.wikipedia.org/wiki/Sri_Lanka_Railways) and this: "The rail system in Sri Lanka is not punctual and also for some routes the train can be slower than travelling by road. Delays are common." (http://www.srilanka-express.com/srilanaka_Rail.html)
However, all that said I would still take the small risk of a delay and travel by train whenever possible in Sri Lanka. The roads are truly terrible and the traffic is some of the worst I've seen in any developing country in the world. In general the bus journeys that we took were uncomfortable, unpleasant, and seriously delayed (usually by traffic in and around Colombo), so really the train is your best option if there is one available.
Hope this helps.