I've just installed a fresh copy of Lion on my machine and much to my dismay I have to set up all of my many mail filtering rules again!
Bugger that, instead I had a dig around and decided to copy across the rules from my previous installation. All the rules you've set up are stored in a
.plist file within Mail's data stored in your Library folder.
In Lion you'll find the rules at:
Under Snow Leopard:
So all you need to do is copy/paste the relevant file from your old machine to the new one.
EditIt's worth noting that you can copy Smart Mailboxes and RSS feeds across as well.
Lion: ~/Library/Mail/V2/MailData/SmartMailboxes.plist Snow Leopard: ~/Library/Mail/SmartMailboxes.plist
RSS Feeds (both OSes):