In the Bitcoin
data directory, which is either C:\Documents and Settings\USERNAME\Application Data\Bitcoin\ or C:\Users\USERNAME\Appdata\Roaming\Bitcoin\ depending on what version of Windows you were using (replace USERNAME with your actual user name). Copy this folder onto your new Windows installation, install Bitcoin, and when you run it, everything should be exactly as you left it.
The wallet itself is in the file wallet.dat, and this is the only file that you absolutely
need to back up (put simply, if you lose this file, you lose your money). That folder also contains your configuration settings and the blockchain database, which are important, but can easily be recreated if necessary, unlike your wallet.