Metal diborides (MB(2)) often have interesting thermal, mechanical, and superconducting properties. MgB(2) was put into focus some years ago for its high transition temperature (39 K) in combination with its simple AlB(2) structure. The boron structure in MB(2) is assumed to be dependent on the electron transfer from the nearby positioned metal atoms. An electronic and structural comparison has been performed here for various initially planar and puckered transition-metal borides, using quantum mechanical density functional theory (DFT) calculations under periodic boundary conditions. In comparison to MgB(2), the experimentally planar transition-metal diborides (ZrB(2), NbB(2), and MoB(2)) and the experimentally puckered ones (TcB(2), RuB(2), RhB(2), and PdB(2)) have been examined. The results indicate that the energetic stability generally follows the experimentally obtained results. The metals that are less electronegative than boron donate electrons to boron, which in turn induce planar boron structures (graphitic-like). The metals that prefer to be planar donate more than one electron, while the trend for metals which favor puckered B structures is that they donate less than one electron per metal atom. Two donated electrons per metal atom (or very close to) will result in the most stable AlB(2) structure.