Cloning a half-full 500 GB drive to a 256 GB SSD drive Before I buy a new SSD, I wanted to see if the following is possible:

I have a 500 GB HD in my MacBook Pro that is using only 240 gigs. Can I clone this to a 256 GB SSD drive? (My goal is to replace the boot spinning drive with an SSD drive.) Then use the 500 GB HD as a second drive in the SuperDrive bay. 

Can I clone to the SSD if it's in a USB enclosure as well?

And what is the best cloning software?

I'm running OS X Lion, if that's useful.
Clone larger HDD drive to smaller SSD drive on Mac. Or migrate from an HDD to SSD.
The fastest and most efficient way can be done completely using standard tools in OS X.
This solution does not require any reinstall, all the way setup of user account and Mac settings, or separate programs or much more time consuming operations than direct disk to disk data transfer.
You need: 1 SSD drive and USB SATA adapter, it can be any enclosure, or SATA to USB adapter cable, or if you have thunderbolt or any faster connection this is even more preferred.

Always have regular backup. Time Machine is recommended way. Do it to external HDD or Time Capsule device.
Boot you Mac into Recovery mode. Reboot your Mac and immediately hold Cmd+R during POST stage (black screen).
Open Disk Utility, locate your existing HDD and select primary partition on the left (mount point /, Type: Logical Partition), this can be named Macintosh HD and in First Aid click Verify Disk, to make sure you are error free before start.
On the left now select primary disk it self (Type Logical Volume Group), and on the right select Partition tab, click + sign and drag primary partition (e.g. Macintosh HD) to resize to size smaller than new target SSD disk. Click Apply.
Now you have to prepare new SSD drive. Connect new SSD drive to Mac if not done so yet, and select it on left in Disk Utility. Click Erase tab and chose name for new device, I recommend to name it SSD, so you can clearly see difference in next steps. This name is for temporary use only.
Under format choose Mac OS X Extended (journaled) and click Erase.
Note: if this disk already was initialized or used on other system like Windows, please delete all existing partitions before this step and start like new! This is important to have new system bootable.
Poweroff and physically swap disks. Do not erase or start using old disk until everything is finished. Do not connect original disk until you are done.
Perform actual data cloning. Boot you Mac into Recovery mode again (Cmd+R). Select Original Primary partition on the left (Macintosh HD) and on the right select Restore tab. Drag SSD prepared partition to Destination field (you called it SSD). Click Restore and wait so many hours, how many you have to physically copy your data from one drive to another.
Reboot to Recovery mode again and choose Boot from main partition in new SSD. Click the Apple menu on the bar at the top of screen and select Startup Disk to access the Choose Startup Disk tool. The boot option will be named exactly the same as was in original hard drive, thus just select it and system will reboot into this his.
Note: this step is necessary to avoid boot wait, because Mac cannot find original disk anymore, and starts into SSD only after about 30 seconds as recovery boot sequence.
Reboot and system will boot fast into old Mac OS X system. Now you are done :)

Note: if your system waits about half a minute before booting when only a new disk is left on the system, then press Alt/option key during startup and just select Mac OS X system. This will reset the default OS and will clear boot wait for old device.
2020 macOS Catalina, Big Sur APFS update:
If you are on APFS already, this task becomes even more trivial.

Just do all steps except repartitioning and shrinking original drive.
Also format new SSD drive with APFS.

If you have amount of data in original APFS Volume which fits your new hard drive, there is nothing to stop you, just recover your new drive APFS Volume with old drive Macintosh HD as a source.
Checked and confirmed its working when I was migrating old SSD to larger SSD drive, also HDD or SSD drive to NVME drive.