Is the sim card and sd card important for iphone 4?

What are their duties toward the phone?

SIM card connects to the cell network, sd card is to store things like pictures, music, etc.

The SIM card is important to connect to your wirelss company IF its a GSM network (CDMA doesn't use SIMs except for new LTE models)

the iPhone does NOT TAKE SD cards so they are not important.

None of the iPhones supports SD cards. The SIM card is for connecting your mobile phone to the carrier's mobile network and also, SIM cards holds your mobile phone number. They are like an ID in a way for your phone. You can also use it to save phone contacts so you can easily transfer numbers from one phone to another when necessary.