If you're going from a windows machine to a mac, yes, but...there is a little more involved.
First make sure your ext HD is formatted so you can both write and read to it from your windows machine. Your mac should be able to only read from it, meaning you should be able to pull your itunes folder from it and drop it onto your mac without issue, but you won't be able to write onto it.
The but part, I believe the file on windows for iTunes is a XML file, you will need to export this file from iTunes then import that file onto your new mac into iTunes, this file I speak of is the one that remembers your playlists, star rating, and all of the content in your iTunes library, it does not save the files, it just remembers them. If that doesn't work, you will just need to export your playlist(s) then import onto your mac. I haven't done the process in a while but you can look up how to do it online easily.
If you don't care about all of your playlists, et cetera and just want your content, then yes, all you do is drag the iTunes folder onto your ext HD then drag it onto your new mac.