If you're thinking about buying an iPhone 3GS right now, here's some very simple advice: wait. Based on not only industry rumors but also historical patterns of iPhone releases, it's widely expected that Apple will debut a new iPhone in less than two months. While we don't know anything concrete about the next iPhone, it seems obvious the next iPhone will have more storage, a faster processor, and possibly even more RAM than the current iPhone 3GS. All of that equals better performance, and it's likely the prices will remain exactly the same as the current models -- meaning you get more bang for your buck. Even if you think the iPhone 3GS is good enough for your purposes, it's likely the iPhone 3G will be discontinued, with the iPhone 3GS filling its place as the "budget" model of iPhone.
On the other hand, you might be looking at an iPhone 3G right now because of its very low price (US$99 with a 2-year AT&T contract; some international carriers are even offering the iPhone 3G for free with certain plans). In the case of the iPhone 3G my buying advice is slightly different, but I can still condense it down to one word: DON'T.
The iPhone 3G is nearly two years old now. That's enough reason by itself not to drop money on this model of iPhone, but thanks to the upcoming iPhone OS 4.0, there's an even more compelling reason not to buy it: Apple's next iPhone OS won't offer all of its features on the iPhone 3G. Specifically, the iPhone 3G will not be able to take advantage of multitasking, the ability to run several third-party apps at once.