Can I switch my AT&T SIM card from my iPhone 3GS to my new iPhone 4 to continue use it or do I have to unlock the iPhone 4?
Not really. The 3GS uses a standard size SIM card and the 4 takes a micro SIM
As long as your iPhone 4 is an ATT carrier brand..and you also have to realize iPhone 4's take micro sim card, not regular sized sim card from 3GS. you can buy a micro sim card punch from ebay as low as $5, it also doesn't matter if you have the 4G LTE sim card
Provided it is an AT&T iPhone 4, you will have no problem at all.
As long as the iPhone 4 is AT&T branded or an unlocked GSM model, your Sim card should work. If it is a CDMA phone (Verizon or Sprint), it won't work.