You (and "everyone") may already know this, but there is a really simple answer to a variant of your question, that is when instead of starting with a Lie algebra you start with a connected differential graded Lie algebra over a field of characteristic zero. In that case, Quillen's work on rational homotopy theory says that data determines a rational homotopy type, and Lie algebra cohomology is the cohomology of that homotopy type. So that answer to your question is that two (connected differential graded) Lie algebras with the same cohomology have the same kind of relationship to one another as two spaces which have isomorphic cohomology rings... which is not necessarily much unless you know something more about them. To some small extent Lie algebras when viewed as differential graded Lie algebras in degree zero (with trivial differential) are analogous to K(G,1)'s, but general theory says little there, so I don't think this addresses your main question. Those interested in an elementary, expository topologist's view of Koszul duality might want to look at [this.][1] [1]: http://front.math.ucdavis.edu/1001.2032