Never allow speakers sound during specific hours

You could try using breakaway and set up a simple applescript set volume output volume 0 to trigger when the headphones are unplugged. (And of course, you could set up another trigger to turn the volume back up when the headphones are plugged in again.)