OS X 10.5.8 - can I upgrade the OS? I have an iMac from 2007-2009 and I want to upgrade the software to improve performance.

It's running Mac OS X 10.5.8 on an Intel Core 2 Duo processor (2.66 GHz). It displays 4 GB of memory and 451.6 available GB on the harddrive. 

Should I try to upgrade to Snow Leopard and then to Yosemite? Snow Leopard requires 5 GB of free hard drive disk space and 1 GB of RAM.  (I don't know how much RAM I have.) Yosemite requires 5.64 GB.
Every iMac from the mid-2007 release onwards can run Yosemite, and the last model that couldn't could also only address 3GB of RAM. So it's almost certain that your iMac will be able to run Yosemite.