This discussion in Apple Support Community may shed some light. First, check to see that Mute is not checked. You may need to reset the system PRAM. Here are the steps: (From Apple Support)
If your Mac doesn’t seem to be remembering your speaker volume,
display resolution, or the disk it should be using during startup, you
may need to reset your computer’s PRAM.
Resetting PRAM may change some system settings and preferences. Use
System Preferences to restore your settings.
Important: To print these instructions, click the Share button in
the Help window, then choose Print. Choose Apple menu > Shut Down.
Locate the following keys on the keyboard: Option, Command (⌘), P, and
R. You will need to hold these keys down simultaneously in step 4.
Turn on your Mac.
Immediately press and hold the Option-Command-P-R keys. You must press
this key combination before the gray screen appears.
Continue holding the keys down until your Mac restarts, and you hear
the startup sound for the second time.
Release the keys.
After resetting your computer’s PRAM, you may need to update your
speaker volume, display resolution, and startup disk preferences. For
more information about PRAM, see the Apple Support article About NVRAM
If you are nervous about doing so, if you have an Apple Store close by, you may wish to make an appointment with the Genius Bar.