Re-downloading all your purchased music (apps, ibooks, videos, everything) is easy if you purchased them from Apple. Assuming they are still available, you simply download them again: http://support.apple.com/kb/HT2519
Retrieving music that you copied from CD or other sources is not easy. Music is supposed to go from your computer to the iPhone, not the other way around. Moving its content to a computer is contrary to the design.
I wish I had a dollar for everyone with a Windows PC who asked this question. Given their predilection for attracting viruses and other sordid malware, Windows PCs crash with disturbing regularity. Now that you made the wise decision to replace it with a MacBook, get an external backup disk (external hard disk drive, or Time Capsule) and simply use Time Machine. Plug it in and Time Machine does the rest. The drudgery of backing up your system becomes painless and totally forgettable, and recovering from a crash becomes a non-event.
Here is some guidance retrieved from an old post. Since it is old, some of the links may not work:
...
For everything else (music from CDs, other downloads etc) there are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod. You'll find that they have varying degrees of functionality and some will transfer movies, videos, photos, podcasts and games as well. You can read reviews and comparisons of some of them here:
iTunes & iPod software
Wired News - Rescue Your Stranded Tunes
Comparison of iPod managers
A selection of iPod to iTunes utilities:
TuneJack Windows Only (iPhone and iPod Touch compatible)
SharePod Windows Only (iPhone and iPod Touch compatible)
iPod2PC Windows Only
iDump Windows Only
YamiPod Mac and Windows
iPod Music Liberator Mac & Windows
Floola Mac & Windows
iPodRip Mac & Windows (iPhone and iPod Touch compatible)
iPod Music Liberator Mac & Windows (iPhone and iPod Touch compatible)
Music Rescue Mac & Windows (iPhone and iPod Touch compatible)
iGadget Mac & Windows (iPhone and iPod Touch compatible)
iRepo Mac & Windows (iPhone and iPod Touch compatible)
iPod Access Mac & Windows (iPhone and iPod Touch compatible)
TouchCopy Mac & Windows (iPhone and iPod Touch compatible)
There's also a manual method of copying songs from your iPod to a Mac or PC. The procedure is a bit involved and won't recover playlists but if you're interested it's available on page 2 at this link: Copying Content from your iPod to your Computer - The Definitive Guide