I have a MacBookPro5 with OS X software version 10.5.8 - is it OK to update it to 10.6.1 or higher?
Assuming by "MacBookPro5", you mean one with a model identifier starting with "MacBookPro5" (they run from 5,1 through 5,5), it's one of several models released in 2008 and 2009. They all support operating systems from Leopard (10.5.x) through the current version of Mountain Lion (10.8.2).
If you want to verify exactly what model you have (a good idea just in case something got mixed up or I misunderstood you), read EveryMac's identification guide.
You will be fine upgrading to 10.6.8 (the newest release of Snow Leopard), but if you want you can go right up to Mountain Lion.
However if you haven't already, you should upgrade the RAM in your system. All of these machines support 8 GB, which is actually fairly cheap these days. 4 GB should be fine for casual usage, 2 GB is getting a bit tight, particularly if you want to run 10.8.