If there's a router between your cable or DSL modem and your PC, and the router is turned off, you cannot possibly get an infection over the Internet. Of course, you can't possibly get email, web pages, or anything else, either. Chances are, if you want your PC on, you want the router on, as well.
And if the computer is off, a live router isn't going to cause an infection. Effectively speaking, there's no PC to infect.
But what if you're using your computer in a totally local way, with no need for Internet access? In that case, turning off the router will eliminate any chance of getting an infection. But if you have a properly-configured router and a good software firewall, your chances of getting an infection when you're not using the Internet are already slight.
Plugging your PC directly into the modem and avoiding the router altogether makes your PC considerably less safe.
Shutting off electrical devices when they're not in use is always a good idea; it will save you money and help the environment. But with routers, doing so is seldom convenient--especially if you're sharing that Internet connection with other people. You may not be using the Internet at that moment, but someone else could be.
Add your comments to this article below. If you have other tech questions, email them to me at firstname.lastname@example.org, or post them to a community of helpful folks on the PCW Answer Line forum.