Best version of OS X for a 2008 iMac?
I am of the opinion that you should keep your O/S up to date unless you have a SPECIFIC reason to stay at an earlier version. E.G. incompatible software that you MUST run or a noted incompatibility with a service that you can't do without (EG some people are still having issues with MS Exchange compatibility in mail.app on Mavericks).
So, your computer has enough RAM (more RAM if possible) and a nice fast SSD so I would go with the Mavericks install... IMHO
I do have the same iMac as you.
I believe Snow Leopard is the fastest system you can install in your iMac though its not supported by Apple anymore.
I did the upgrade to 10.9 and I felt the system slower, but, I did that because some softwares required the upgrade to run.
When Yosemite came your, I gave it a try. I made a fresh install and, at beginning everything appeared to be normal. But I felt the system VERY slow at everyday life tasks. So I decided to downgrade back to Mavericks.