Yes, a SIM card can definitely become infected, anything that runs code can become infected for that matter - even your USB firmware can become infected (BadUSB exploit - check #3 on the blog post by Kaspersky I linked the text too).
Although, that being said, it's very unlikely that you will ever run into a scenario of your SIM card becoming infected. It is very unlikely and not all SIM cards are the same therefore the attacker would need to find an unpatched vulnerability for the target SIM cards and then gain enough access to deploy the infection to the target.