I know with past experience when doing work on all of my audio equipment that it is better that you disconnect the battery when wroking but not necessary either. I just saves you from any sparks or fuses being blown on products like amps. In terms of the security code, if you do disconnect the power then yes the radio will reset all of the settings except for the security code and will require you to re-enter it in order for the stereo to function (Kenwood models at least).
For installing an Ipod, you should will be okay without a battery disconnect.