Open the System Preferences and click on 'Sound' to open the Sound preferences. Is the 'Line Out' section highlighted in the Output section? If not, select Line Out to send the audio to the Bose speakers through the audio out port. I also suggest making sure that you plugged the speakers into the audio OUT port rather than the identical looking audio IN port. The audio OUT port icon looks like a tiny pair of headphones as seen in the picture below excerpted from the iMac (Mid 2011): External features, ports, and connectors article. I also suggest verifying that the mute option is not checked, and that the output volume is set above minimum.
Well, that explains why you don't have any audio through your external speakers. Now we just need to figure out how to restore it.
I first suggest resetting the PRAM by restarting your iMac while holding down the command-option-P-R keys until you hear the system restart tone two times. If there is a corrupted parameter then this will resolve the issue. You can read about the PRAM reset here:
If the issue still occurs, try unplugging and reconnecting the speakers from the audio OUT connector.
If you still cannot get it to work check to make sure that you have the correct 3.5mm connector on the cable that you are using to connect the speakers to your iMac. You probably do, but it's worth checking. If you have another device you can plug the speakers into (iPhone, iPod, another computer, etc) I suggest verifying that they work properly on other devices.
If you still have problems then you may need to contact the place where you purchased the iMac. If you purchased within the last couple of weeks you may be able to exchange the system.