During the install of OS X on your new hard drive select restore from time machine backup. That should transfer all of your files to your new computer.
Depending on what macbook it is, the process can be quite lengthy;
but generally, you install the HD, then reinstall OS X onto that drive, then when you boot up the first time you are allowed to use the migration assistant to "migrate" all your files to your new drive