  The electronic energy structures and magnetic properties of layered
superconductors $R$Ni$_2$B$_2$C, $R$Fe$_4$Al$_8$ and FeSe are systematically
studied, by using the density functional theory (DFT). The calculations allowed
us to reveal a number of features of the electronic structure, which can cause
the manifestation of peculiar structural, magnetic and superconducting
properties of these systems. It is demonstrated that the Fermi energy $E_{\rm
F}$ is located close to the pronounced peaks of the electronic density of
states (DOS). The main contribution to DOS at the Fermi level arises from
$3d$-electrons. The calculations of the pressure-dependent electronic structure
and the magnetic susceptibility in the normal state indicate that the novel
superconductors are very close to a magnetic instability with dominating spin
paramagnetism. It is shown that experimental data on the pressure dependence of
the superconducting transition temperature in FeSe correlate qualitatively with
the calculated behavior of DOS at $E_{\rm F}$ as a function of the pressure.
