Obviously Wildfire S is better to invest than Iphone 3g. Hardware wise Wildfire S is better in every way than Iphone 3g.
Lets compare Wildfire S and Iphone 3g (Courtesy of GSM Arena)
Display:
Wildfire S - TFT capacitive touchscreen/256K colors/320 x 480 pixels/3.2 inches, Gorilla glass
Iphone 3g - TFT capacitive touchscreen/16M colors/320 x 480 pixels/3.5 inches
Advantage - HTC Wildfire S because of Gorilla Glass. While 16M in Iphone would sound big deal, let me remind you that for smaller screen 256k colors does the job.
Processor/RAM:
Wildfire S - 600MHz Snapdragon MSM7227 CPU, Adreno 200 GPU & 512 MB RAM
Apple Iphone 3g - ARM 11 412 MHz, PowerVR MBX-Lite graphics & 128 MB RAM
Advantage - While we can argue that you cannot compare processor and ram between two different OS, we can clearly see that HTC Wildfire S is much better than Iphone 3g
Camera:
Wildfire S - 5 MP Camera, LED Flash
Iphone 3g - 2 MP Camera, No LED Flash
Advantage - Clearly HTC Wildfire S
Email:
Wildfire S - Push Email, Email, IM, SMS, MMS
Iphone 3g - Email, SMS, MMS
Advantage - Wildfire S with Push Email option
Now like "Hades" have mentioned, if you are planning to buy Wildfire S. Why not pay up to get Defy? Here's why:
1) Defy cost only 1 - 2K more depending on where you buy it. Even it might sell for same price at 13.3k at some locations.
2) It has 800 mhz processor which is easily overclocked to 1 ghz and used by members here. So this puts this phone into completely different echelon compared to Wildfire S. RAM is same.
3) Screen size is 3.7 inches in Defy compared to 3.2 inches in Wildfire S. You might think its only .5 inches, but trust me it is a big difference.
4) Excellent ROM Support from XDA developers (If you are into custom modding)
5) With custom modding you can record 720p videos with 5 MP camera and LED flash that comes with Defy.
6) One of the main reason why Defy is popular is its long lasting ruggedness. That is right, it is rugged, water proof, dust proof and will last longer than any other handsets in the market with even heavy usage. That is why most people buy it so that they can hold on to it for longer period and also at the same time enjoy android experience.
At the end, it is your choice. But I would completely discount Iphone 3g, Unless you want to buy it for brand. Between Wildfire S and Defy, clearly Defy would be better choice.