My Xbox 360 broke. Can I connect the hard drive to a new one and still have all my data?
Hopefully you are referring to a Generation 1 (White original, 20gB) 360 console or the elite. The newer consoles from my knowledge do not have external hard drives. If you want to transfer data I believe that you would need to purchase a data transfer kit or open up the Xbox.
TZHX does make a point that it is possible, and indeed it is, but it requires separating the hard drive from the xbox. You say that your xbox 360 is broken, so I assume you can't even turn it on. At which point you will need to open up the xbox.. (or purchase a "Data" transfer kit). I would recommend not opening up the xbox on your own without parent supervision or professional help because you could end up damaging your hard drive permanently, causing you to lose everything.
Also all friends, achievements, and purchases are linked with your gamertag, so if you are referring to this, you could just buy a new xbox. Assuming that you are referring to game saves, then transferring data from the hard drive is your best bet.
Please note that all downloads and purchase (as stated above) are linked with your gamertag (according to microsoft). However the game saves (like progress on a game for example) are saved on the hard drive.