Replaced hard drive in iMac, have time machine back up but no installation discs
You have several options to accomplish this. You'll need either a firewire 800 cable, a thumb drive (8/16 GB or bigger) or a DVDR. I suppose the new hard drive is already mounted to the iMac 2008.

Target Mode


Attach the firewire cable to both Macs. Boot the iMac 2008 in Target Mode by pressing T while booting. You will see a "jumping" Firewire logo on the screen if you have been successful. 
Attach the Time Machine backup drive to the iMac 2010.
Boot the iMac 2010. 
Start Disk Utility to partition the Target Mode hard drive in the iMac 2008 (if necessary). Use one partition, HFS+ Journaled and GUID partition table. Don't partition your Time Machine drive accidentally. 
Quit Disk Utility and open Time Machine.
Restore the Time Machine backup to the Target Mode disk.
Eject the Target Mode disk and detach the Firewire cable.
Reboot the iMac 2008


Bootable OS X thumb drive


Download 10.7-10.11 OS X Installer from the App Store and create a bootable OS X thumb drive (16 GB or bigger) on the iMac 2010 by installing OS X to it.
Boot the iMac 2008 with the thumb drive and the Time Machine backup drive attached
Start Disk Utility to partition the internal hard drive in the iMac 2008 (if necessary). Use one partition, HFS+ Journaled and GUID partition table. Don't partition your Time Machine drive accidentally.
Quit Disk Utility and open Time Machine.
Restore the Time Machine backup to the internal disk.
Reboot the iMac to the internal disk.


Hack the iMac 2010 Installer DVD

Several similar methods exist to modify a restore DVD to be universal. Only one is outlined below. This is only recommended if the previous system on the broken hard disk was Snow Leopard.


It takes time to make modification work on DL-DVD, so i used 8GB USB thumb drive, restored Snow Leopard DL-DVD to USB thumb drive with Disk Utility.
After you get SL on your USB thumb drive, you need to modify OSInstall.mpkg file (which is located on Packages folder) with Flat Package Editor, and to get FPE you have to install Xcode.
After that go to 

/Developer/Applications/Utilities/PackageMaker.app/Contents 

open Flat Package Editor, choose File->Open and open OSInstall.mpkg, you will see Distribution file, drag it to your Desktop(do not close Flat Package Editor, we still need it), and open it with your favorite text editor, Look for the following:

&lt;installation-check script="installCheckScript()"/&gt;
&lt;volume-check script="volCheckScript()"/&gt;


they are on the line 50052 and 50053, remove installCheckScript() and volCheckScript(), and this is how they should be:

&lt;installation-check script=""/&gt;
&lt;volume-check script=""/&gt;

Save modification, and re-drag Distribution file to Flat Package Editor and go to File->Save, that's it, now you should have a working OEM Snow Leopard on any iMachine.
Boot the iMac 2008 with the thumb drive and the Time Machine backup drive attached and install Snow Leopard.
While configuring Snow Leopard, use the Migration Assistant to import all data from the backup drive.