While you often try to adjust your exposure to avoid loss of detail, there are situations in which the contrast in the scene is just too high. Unless you use artificial lighting or graduated filters, you may have to accept some detail loss. You could also use multiple exposures—one exposure for dark areas, one for light ones—and merge them in your image editor. (If you can shoot in RAW mode, you might be able to recover some detail.)
In many cases, the best exposure might have a histogram that displays a uniform set of values across the entire graph, but this isn't always the case. The histogram reflects the scene, and not all scenes have a standard set of brightness values. Take, for example, a scene of morning mist over a swamp. In this situation, there may not be any dark tones in the scene or on the left side of the histogram.
As a rule, however, be careful of images that graph only on the left half of the histogram. Underexposure like this can overemphasize noise in the image sensor.
"Ideal" histogram? It's really image-dependent. A "best" histogram doesn't look like any one thing. Generally, though, if you stay away from a histogram that's heavily weighted to one end-particularly the far left-and you avoid clipping, you'll be on your way toward achieving good exposure.