Sri Lanka has quite a lot of snakes but they usually keep out of open areas with many people around, so you're unlikley to ever come across any of them. And even if you see one, it's probably not poisonous.
The most common poisonous snakes are the cobra, the krait and the viper. You're way more likely to see a cobra (easily identidied, most of them have large scales) with a snake charmer on a street than ramdonly spotting a wild one! The krait (usually black and white stripes) comes out at night and might seek shelter inside houses during the rainy season - in that case your best bet would be going to bed at a reasonable hour and keeping the doors and windows shut. The viper (black with green, might be with round spots) also mainly prefers nighttime.
|Sri Lanka krait|
|Sri Lanka green pit viper|
If you look at the statistics, Sri Lanka is well up there as one of the snakebite fatality hotspots. But those unfortunate enough to get bitten are usually people living in villages and other rural areas. You definitely won't see any snakes in your hotel. Unless you're staying at a guest house in some remote village or going to the jungles, there's nothing to worry about!
If you do get bitten by a snake, though, the most important thing is to immediately seek treatment. Even in the case of the worst snake bite (which would be by the Russell's Viper who's brown or dark green with darker round spots), you’re very likely to survive if you get to a hospital right away. Sri Lankan clinics, predictably, are well-equipped to handle snake bites. Also, try and identify the type of snake which bit you, and you’ll save a lot of time once you arrive.