Any alternative to iOS for an iPhone 3G? I have an iPhone 4, and I would like to recycle my “old” iPhone 3G.

Is there a good Android-for-iPhone?
A Linux distribution optimized for iPhone?
Another alternative OS, like a BSD or a BeOS-like?

What OS other than iOS can run on iPhone 3G hardware and how would I install the OS you recommend.
Well you can tried iDroid for iPhone 3g. I installed it to my friends iPhone 3G. 
But you need to have jailbroken iPhone. 
Click on the following link: www.idroidproject.org
They are having Bootlace application which will installed the iDroid on your phone. 
the version I used on 3g, was not very impressive(but these guys are continuously working on it to make it better). Recently I got update from that new version is out. 
I personally found it hard daily basis need. but If you are keeping it as experiment its really good. 
Its hard for iPhone to have another software as it need complete reverse engineering[Hard Job] to get some other OS work on it perfectly. 
But still you can give iDroid a try. Its easy to install and remove if you don't like it.