Unfortunately the 21.5" late 2009 iMac model cannot be used as a display via Target Display Mode, although the 27" model could.
It's not clear what state your old iMac is in (working order or not), but if it boots then you can use it for a number of purposes (e.g. as a file and/or print server, for sharing a VPN connection, for sharing an iTunes library, etc).
If you really wanted to take advantage of its screen, you may have some limited success with a software solution. For example, people use Air Display to use existing iMacs as monitors for other devices/computers. However, this and other software solutions can be a little hit and miss, and then it's only to connect to the one Mac as a display.
Another option is to use your old iMac in Target Disk Mode. This is effectively a way of turning your iMac into an external hard drive. For more information on this you can read Use target disk mode to share files between two Mac computers.
Finally, if your old iMac is not in working order, you can sell some of its parts online (e.g. via eBay). If this is your scenario, you may want to consider keeping the hard drive and using it in an external case as an external hard drive for your new iMac. Whether this is worth doing will depend on its size etc.