It is a shell script, which is basically just a strict text document with execute privileges.
My favorite text editor is TextWrangler. Its free and saves documents as text by default. TextEdit can too, but you need to set the preferences to save as text, and be aware that the Lion version of TextEdit is known to save version info, which can muck with what otherwise would be strictly text. Get TextWrangler from the BareBones web site, not the App Store, as the App Store version is a little crippled due to App Store policy. It's a great product.
If you would like to become more familiar with Unix text editing, but require a somewhat smaller learning curve than VI, then try using nano.
There is a help menu at the bottom of the nano "window"
sudo nano LogoutHook.sh
You can copy and paste into the nano window at the current cursor position, but with most things Unix, there isn't much in the way of mouse support within the application. :P