On my MacBook Pro (Retina, Mid 2012) running 10.9 Mavericks, the solution
sudo nvram SystemAudioVolume="%80"
didn't work for longer than a few days.
The solution first mentioned by Hippomormor, perhaps originally proposed by Macworld Hints in 2003, worked on 10.9 but became problematic after I upgraded to 10.10 Yosemite. Although turning the sound off before shutdown still worked, turning it back on after boot-up often failed and had to be done manually.
To solve this, I kept the part that mutes at shutdown:
sudo nano /Library/Scripts/mute-on.sh
and pasting
#!/bin/bash
osascript -e 'set volume with output muted'
and saving, and then
sudo chmod u+x /Library/Scripts/mute-on.sh
sudo defaults write com.apple.loginwindow LogoutHook /Library/Scripts/mute-on.sh
all as described by Hippomormor. But I had to make changes in the part that puts the volume back on at boot:
sudo nano /Library/Scripts/mute-off.sh
with an extra line in the script to make it wait until the Applescript system is ready:
#!/bin/bash
sleep 10;
osascript -e 'set volume without output muted'
and after saving and closing, I created a new file /Library/LaunchDaemons/com.giessen.soundon.plist with these contents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.giessen.soundon</string>
<key>RunAtLoad</key>
<true/>
<key>Program</key>
<string>/Library/Scripts/mute-off.sh</string>
</dict>
</plist>
Now it all works again on 10.10. From the reactions above, it seems to me that mileage may vary in big and unexpected ways. That is strange, since we're all using the same operating systems.