This is actually a bit of myth, some of our security expert members may be able to better explain it but essentially it's two fold.
Unix based systems differ from Windows based systems, so generally a virus does not spread as easily.
Secondly, Windows is the dominate system (although OSx is gaining ground) which makes it more of a viable target when producing a virus whether it's for underhanded commercial gain, corporate espionage or just misguided individuals with too much time and a misspent childhood.
When we think of what a virus actually is, and lose the stereotype and the hype, the majority of computer devices have the ability to be infected and/or compromised from next generation fridges to mobile phones.
Darren pointed on some key things. Specifically on the part of the vast number of windows devices. If you were going to develop malware and wanted to affect the most number of systems, at this moment, Windows is a good choice. Aside from having many systems to target, think about how easy Windows is to install. Anyone can install windows, next, next, finish....While Windows has done more to secure their operating systems, the fact is that a default installation of Windows introduces many unecessary system services, points of entry, etc... Unexprienced users run their systems as administrators, install unknown and untrusted software, etc..
Keep in mind that every Operating System and application will have vulnerabilities, some more, some less than others. Programmers are not perfect. Some projects are more rushed than others and do not take the extra care to ensure that the software is bug and risk free.
Some operating systems are not targetted to the consumer so they are not as easy to install, and they may not enable every feature by default.