This is starting to become a big issue, so it's high time we whipped up a how-to about the permanent fix for the problem of the Market hanging during download or installation of apps.
I'm sure that there are other reasons this could happen, but the following should fix it for most users. It's not nearly as hard as it looks, and I'll try to toss some images in to help keep things clear.
What's happening
Since Froyo came along, we now have an encrypted folder on the SD card for application installation. I'm not 100% sure why or how, but the folder seems to be fouling up for a lot of folks. When certain apps are coded to be installed to the SD card by default (Angry Birds anyone), if your folder is wonky, it won't work. There's two fixes -- an easy, temporary fix, and a more involved semi-permanent fix.
The Easy Fix
When you try to install an app from the Market that won;t download or hangs at the installation, cancel the install. Then, on your phone, press menu--> settings --> SD & Phone storage. You'll see this:
Select the Unmount SD card option, then install your application. After it's installed, you can go back and Mount the SD card, or reboot.
The more permanent fix
While it's not too hard, if you're like me you get tired of doing things more than once. Here's a semi-permanent fix (semi because the folder can get all wonky again).
Open the Manage Applications screen (menu --> settings --> Applications --> Manage Applications) and select the far right tab that says "On SD card"
One by one, select each application and move it back to your phone's storage using the "Move to Phone" button.
Yes, it's tedious, but it's worth it in the end.
Once you have all your applications moved off the SD card and onto the phone's internal storage, open up your file manager (Astro is a good one if you don't already have a favorite, I'm using the open source file manager built into CyanogenMod in the example -- but they should all look very similar) and look for a folder named .android_secure.
This is the encrypted folder where all your applications used to be. Delete it. As long as you have moved all your apps back to the phone storage, nothing in that folder is needed for anything.
Reboot your phone. After it restarts, go back and place your applications back on the SD card. You should now be able to download and install apps that need to use the SD card again.
I'm sure that there are other reasons this could happen, but the following should fix it for most users. It's not nearly as hard as it looks, and I'll try to toss some images in to help keep things clear.
What's happening
Since Froyo came along, we now have an encrypted folder on the SD card for application installation. I'm not 100% sure why or how, but the folder seems to be fouling up for a lot of folks. When certain apps are coded to be installed to the SD card by default (Angry Birds anyone), if your folder is wonky, it won't work. There's two fixes -- an easy, temporary fix, and a more involved semi-permanent fix.
The Easy Fix
When you try to install an app from the Market that won;t download or hangs at the installation, cancel the install. Then, on your phone, press menu--> settings --> SD & Phone storage. You'll see this:

Select the Unmount SD card option, then install your application. After it's installed, you can go back and Mount the SD card, or reboot.
The more permanent fix
While it's not too hard, if you're like me you get tired of doing things more than once. Here's a semi-permanent fix (semi because the folder can get all wonky again).
Open the Manage Applications screen (menu --> settings --> Applications --> Manage Applications) and select the far right tab that says "On SD card"

One by one, select each application and move it back to your phone's storage using the "Move to Phone" button.

Yes, it's tedious, but it's worth it in the end.
Once you have all your applications moved off the SD card and onto the phone's internal storage, open up your file manager (Astro is a good one if you don't already have a favorite, I'm using the open source file manager built into CyanogenMod in the example -- but they should all look very similar) and look for a folder named .android_secure.

This is the encrypted folder where all your applications used to be. Delete it. As long as you have moved all your apps back to the phone storage, nothing in that folder is needed for anything.
Reboot your phone. After it restarts, go back and place your applications back on the SD card. You should now be able to download and install apps that need to use the SD card again.