iOS 4 is now available for download and install via iTunes for Legacy devices (iPhone 3GS and iPhone 3G -- not available for first gen iPhone).

worth reiterating:

************* NOTE ****************
Please note -- that if your iPhone is jailbroken to provide a carrier unlock, applying this update will lock it again, and remove the jailbreak. If you depend on a jailbreak for an unlock, DO NOT UPDATE.
************* NOTE ****************

Good review of iOS4 from Dan Moren:

Apple iOS 4 Smartphone Review | Macworld

While formal benchmarking is tricky on the iPhone, my initial impression of iOS 4 on my iPhone 3GS is that it’s quite snappy — more so than version 3.1.3. The OS as a whole seems more responsive, but there are a couple of places where speed improvements are pronounced: in general, the Camera app running on an iPhone 3GS seems far zippier now than previously. Pictures get taken almost instantaneously, and I didn’t notice any of the sluggishness that has occasionally plagued iPhone 3.0.
I’ve been running the GM release on my 3GS for weeks, and I agree. iOS 4 feels faster than 3.x on the same hardware.