Ofcourse! There's no point in creating malware for OS that is rarely used. That's why there is so much malware for Android and Windows. Additional problem for Android phones is that a user can install APK file downloaded from the Internet and that's not possible with iPhone. iPhone (that's not jailbroken) is pretty closed system and user can't install anything on it if it's not on the App Store.
This isn't usually enabled by default, and would either need to be compromised in the first place or the user themselves must turn it on. So, generally its the user that compromises themselves through their usage, rather than operating systems being insecure. Windows, and Android are actually pretty safe from most attacks. Its the user themselves which reduces that security.
Linux is generally more secure not only because its not as widely used, but its also used by more technically minded users, generally. However, because of the way the file system, and permission system works its inherently a little more secure than that of a default Windows system.