Personally I had no problems with the switch. Most of the code running on my server is homebrewed so I knew I hadn't used any unusual PHP4-specific functionality. If you use a lot of third party code there may be a hiccup somewhere. But the PHP folks are pretty good about maintaining backwards compatability so that things don't break when you upgrade.
I am thinking to move some websites to a new server running PHP5.
That's a wise decision. Do it as soon as possible, because the PHP team no longer releases any security fixes for PHP4. Using PHP4 may make your server vulnerable. Seriously.
Will all scripts developed under PHP4 will still be working with PHP5?
Most scripts will work, but it's typically impossible to test everything under all possible circumstances and conditions. Therefore, you need to inspect the code (or have a PHP developer inspect it for you) following this official migration guide: