IOS 4.2. IOS 4.3 is only for iPhone 3GS, iPhone 4, iPad, iPad 2, iPod Touch 4, and iPod touch 3rd gen.For IOS 4.2 you get folders, multi-tasking, Air Print, AirPlay, Game Center, SMS/MMS tones for contacts, and more... I hope this helps!!!!
stay on iOS 3.1.3 for best speed if it's a 3G iPhone (2nd gen) then you can also run an alpha version of android as well (http://idroidprogect.org)
but upgrading to 4.2.1 is crappy and appl dosnt even support is anymore so bu iPhone 4