Can a Windows PC do anything while it is sleeping?
I heard that OS X Mountain Lion on a Mac has a feature called Power Nap :
With Power Nap, your Mac sleeps but your applications stay up to date. So you have the latest information — such as mail, notes, reminders, and messages — when your Mac wakes up. Power Nap performs Time Machine backups to Time Capsule and downloads OS X software updates while your Mac sleeps, so you can begin installing as soon as you wake it up.
Can Windows do the same on a PC?
Does Windows 8 / Windows RT have any new features that can do any special task while it is sleeping?
Windows (Vista+ anyway) provides something similar, and can/will wake your computer from sleep states to do updates, backups (etc).
Having said that, your motherboard's firmware needs to support, and be setup to use, this feature.
They're referred to as 'Wake Timers' in the Power options (where you can enable and disable them).
The system is part of the Task Scheduler (primarily). You can find it by opening a task in Task Manager and looking under 'the Conditions' tab, where you will find a "Wake the computer to run this task" check box.
There you can also make you own tasks that will wake up the system to do what you'd like.
More info here (SuperUser) and here (MS).
Sleep is a lowered power state, but it is not turned off. Obviously, if the computer was off, nothing would work.
Windows, as far as I know, doesnt provide programmers the ability to write code that executes while the PC is a sleep state.
However, that does not mean programs are not running. Windows needs to detect events that wake the PC. Events can be ACPI power button press, mouse movements or clicks, magic packets (Wake on Lan), or keyboard presses. I might be missing some. Windows is also "awake" enough to properly shutdown a sleeping laptop if the battery is about to die.
Now Apple allowing certain functions to be done while sleeping is a double edged sword. Yes, backups and such can occur, but if the device was on battery power it would drain faster, defeating the purpose of sleep's low powered state.