It's possible to run into trouble when sharing monitors between your Mac and another computer. You may be trying to use an external monitor with a Mac, for example. Sometimes when unplugging it from a PC and connecting it, the screen can stay black and go into standby despite the Mac recognising the display.
To start with, let's understand how OS X works when you turn your computer on. OS X sends a query to the monitor through the video cable when the Mac first boots or wakes from sleep, when you plug in the Mac end of the video cable, and when you hold å in Display Preferences and click the "Detect Displays" button.
If the monitor doesn't answer with its display ID at any of these points, the Mac will conclude that there isn't anything at the other end of the cable and will stop sending video data through it. The monitor, in turn, will drop to standby as soon as it goes a few seconds without receiving a video signal.
It may be that your monitor isn't responding because it's only listening to the PC through the DVI port at the time and doesn't switch over immediately.
You could try using the Detect Displays button on the Mac to send a few extra ID queries down the cable and see if the monitor catches any of them. If that doesn't work, try cycling the power on the monitor first, before you plug it into the Mac. Even if this works, however, it's a little inconvenient to have to turn the monitor off and on again every time you switch computers.
However there is a glimmer of hope. There are a few monitor detection bugs in Mavericks that Apple is aware of. If you upgrade to Yosemite, there is a chance that Apple has already fixed this issue in the display driver.