Mac: If you've been using Messages for a while, you may not want to let your archived messages go when you move to a new Mac. iCloud should backup and restore a lot of it, but if that history goes back pretty far, it won't get it all. iMore shows you how to make sure it comes over to your new computer.
Essentially, you just need to head to the
~/Library/Messages folder on your old computer, then copy the entire contents inside there to the same folder on your new computer. This will include archives and attachments. When you're done, restart your Mac and your full Messages history should be there. Head over to iMore for the full step-by-step guide.