It could be because your Mac or the display has gone into sleep mode. This happens due to long hours of inactivity to save energy. If the screen is black while the Mac is starting up and does not resume to a normal state, it could be because of other internal hardware errors.