Sn0wbreeze 3.1.3 has been released which can jailbreak iPhone 2G, 3G and iPhone 3GS on the latest iPhone 3.1.3 firmware. One thing which is to be noted here is that it will work with iPhone 3GS only if it has the older bootrom (non-MC model). iPhone 3GS users who have upgraded to the stock 3.1.3 are still out of luck.
This is a guide geared towards iPhone users with Mac OS X. The steps are exactly same as they are on a Windows system. You can find the Windows version of the guide here.