My aging slot loading iMac 400 runs *cough*10.3*cough* surprisingly well. It wasnt too bad with 10.2 either.
I'd imagine a slower/older iMac would be, well, erm, a lot slower and not so nice to use.
But whatever you get, chuck loads of ram in it for best results.
If speed really isnt an issue though, then pretty much any iMac can run OS X. But as I said, personally, I dont think i'd want to run it on anything slower than an iMac 400.