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.
I am from Sri Lanka and a regular train traveler. To answer your question, I would say that at least 50% of trains in Sri Lanka get late on a regular basis. This is no exception for the namesake intercity trains, most of which are in fact regular express trains which have booking facilities. Long delays are very frequent in the more touristic upcountry line due to landslides, derailments, frequent repairs and many other practical reasons. Be prepared for the worst, 4-6 hour delays and entire cancellations happen and never expect refunds; you won't get any.
However, it's all worth the wait; the views are majestic!
If you're on a tight schedule and time is very important, please use the roads. Contrary to what is mentioned in Paul Raftery's answer, I find the roads to be in very good condition and they are definitely the best you'll find anywhere in South Asia. For example, a road journey from Colombo-Badulla would take around 6 hours by car, while by train it would take around 14 hours without delays.
Traffic, is, of course a big issue in Colombo, but has very little relevance elsewhere, so trains are definitely the quickest mode of transport in central and suburban Colombo during rush hours. Hope this gives you an idea.