First you would have to define security, it's just as easy to break into an unsecured linux box as it is to break into an unsecured windows box. That being said when it comes to automated attacks like viruses, worms, and other malware, linux has a major edge.
I would most certainly say Linux, but it would depend on your distribution. Linux has a lot of different "flavors" or distributions that are used.
Even the worst linux distribution is going to be a lot resistant to viruses. There are a variety of reasons behind this, one was already mentioned and that is security through obscurity.
I mean this in a different context however. The reason I would call the linux OS code a lot more obscure, is because you can use it in more ways than just out of the box. You can code and re-compile your kernel at will, so for all intents and purposes, the code could be 100% unique.
The second reason behind this resistance is also due to obscurity though in a different way. Because there are a lot more windows users than linux users, most viruses are a .exe, or an exe poisoned jpg/doc. On linux exe files won't even run (without certain software and permission editing). So sure if there was a .tar.gz virus or .rpm or .deb virus it would affect linux...You notice those 3 extensions? Those are the same as .exe but for different linux distributions...
So let's say you want to create a virus to target linux users, which of the many, many types of executable do you use? You'd have to keep in mind, most of these won't work between different distributions. Sorry if that got a little too technical.
The last thing is pretty simple, you notice when you hit ctrl-alt-del and go to your process list you have all those windows processes running? Linux has a lot, lot less running. The way linux is designed, when you install it, you choose the software you're going to use and it installs only that. Because there are dramatically fewer programs running, there is a lot less to exploit.
Hope this was helpful!