So I just got a new MacBook Pro for graduation. I've decided to use my iMac as an external display and use my Macbook Pro as my main computer. My iMac has about 1TB of space while my MacBook has about 500 GB. Since I'll be using my iMac primarily as a external display I was thinking about also using it as an external harddrive so I can backup my data from my Macbook via Time Machine. Is this ok to do? Does anyone advised that I don't? I just want to make sure I don't screw up anything before doing so. BTW I also have a WD external harddrive connected to my iMac.
Yes, you can do that.
You must create a second partition the iMac's internal HD for the backups. See #3 in Using Disk Utility for instructions.
Assuming you want to do the backups over your local network, see Time Machine - Frequently Asked Question #22 for setup instructions (they're for an external HD connected to another Mac, but you can use the new partition instead).