Is it okay to install OS X on an external drive, and then install that drive as an internal drive? My internal drive is suffering hardware failure, so I bought OS X Snow Leopard (to upgrade my iMac from Leopard), a new drive, and a cheap external USB 2.0 enclosure.  My plan is to install a clean copy of Snow Leopard on the new drive as an external drive, restore a time-machine backup to it, and then finally swap the new drive into the iMac.

The main reason I'm doing it in this order, instead of just putting the drive in first, is timing.  It's easier to install OS X on a fresh drive and restore the time machine backup during the week, when I have less time to mess with it, because those are fairly hands-off activities.  I plan to do the drive swap this weekend when I have time for it, as I hear it is a fairly involved process to replace the internal drive on an iMac.
I've done this several times and never had a problem. Just make certain your external drive uses the correct partition scheme (GUID for Intel Macs) and format.

I once forgot to change the partition scheme and, as a result, couldn't run firmware updates until I reformatted the drive.