As with so many other things in diving, the best defense is a good offense. Nolatom's post, although tongue in cheek, has real truth in it -- someone on the boat is much more likely to notice you are gone, if they have registered you were there in the first place. In addition, it is a good idea to ask any dive op about their roll call or check-in procedures. Every boat should have one. Other things that will help prevent being left behind are honoring the requested dive time, staying with the guide (if requested), and recognizing quickly when something is going to put you out of range (aborting a dive where the current is too strong AND sending up a marker buoy immediately, for example). One can also help prevent this kind of thing by recognizing when the requirements of the dive are beyond your current capacity (new divers doing hot drops into high current drifts, for example).
Once you HAVE been left, having methods to make yourself visible to searchers is very useful. That can include SMB/safety sausages, mirrors, dye packs, or even personal life rafts, depending on how isolated the place are where you are diving. Being buoyant is useful, so jettisoning weights should be high on the list, if it appears the wait will be long. Remaining, as best you can, in a place certain, will aid searchers, especially if you can stay in the vicinity of where the dive was done. (The exception to this would be if there is land within reasonable reach -- and that means both distance AND current.)
But overall, it is far better not to be left than to be rediscovered.