Mute volume of macbook on sleep
Download SleepWatcher (free, source code included).
Install it using the instructions included in the download.
Have your 'sleep' script call osascript (AppleScript)

/usr/bin/osascript -e 'set volume with output muted'


Now your Mac will be muted anytime your computer goes to sleep.

If you want to make extra sure that it is muted when it wakes from sleep, add

/usr/bin/osascript -e 'set volume with output muted'


to your 'wake' script as well.