The ESRB thinks ALL games should be rated, regardless of distribution. However, they are just a private entity, so it's up to console manufacturers to "require" getting rated (although I'm sure some retail stores will refuse to carry a game that isn't rated).
There is nothing in the iPhone SDK or license agreement mentioned ESRB requirements.