Based on first-principles full-potential linearized augmented plane wave method (FLAPW)--generalized gradient approximation calculations, we have investigated structural and electronic properties of low-temperature superconductors ${\text{SrNi}}_{2}{\text{As}}_{2}$ $({T}_{C}\ensuremath{\sim}0.6\text{ }\text{K})$, ${\text{BaNi}}_{2}{\text{As}}_{2}$ $({T}_{C}\ensuremath{\sim}0.7\text{ }\text{K})$, and ${\text{BaNi}}_{2}{\text{P}}_{2}$ $({T}_{C}\ensuremath{\sim}3\text{ }\text{K})$, as well as ${\text{SrNi}}_{2}{\text{P}}_{2}$. Our results show that the replacement of alkaline-earth metal $(\text{Sr}\ensuremath{\leftrightarrow}\text{Ba})$ and pnictogen $(\text{P}\ensuremath{\leftrightarrow}\text{As})$ types leads to anisotropic deformations of crystal structure caused by strong anisotropy of interatomic bonds. The band structure, density of states, and Fermi-surface features for $(\text{Sr},\text{Ba}){\text{Ni}}_{2}{(\text{P},\text{As})}_{2}$ are evaluated and discussed. As distinct from $(\text{Ca},\text{Sr},\text{Ba}){\text{Fe}}_{2}{\text{As}}_{2}$---the parent phases for ``122'' FeAs superconductors---the Fermi level in $(\text{Sr},\text{Ba}){\text{Ni}}_{2}{(\text{P},\text{As})}_{2}$ phases is shifted to the bands with higher dispersion $E(k)$ but lower density of states as a result of increased electron concentration. Therefore the Fermi surfaces for $(\text{Sr},\text{Ba}){\text{Ni}}_{2}{(\text{P},\text{As})}_{2}$ phases differ essentially from those of the FeAs-based materials and adopt a multisheet three-dimensional type. Our estimations show that $(\text{Sr},\text{Ba}){\text{Ni}}_{2}{(\text{P},\text{As})}_{2}$ are within the weak-coupling limit with a small average electron-phonon coupling constant ${\ensuremath{\lambda}}_{\text{ep}}\ensuremath{\sim}0.16--0.24$. The bonding in $(\text{Sr},\text{Ba}){\text{Ni}}_{2}{(\text{P},\text{As})}_{2}$ is of a complex anisotropic character. Namely, the bonding in [NiP(As)] layers may be described as a mixture of metallic, ionic, and covalent contributions. In turn, between adjacent [NiP(As)] layers and (Sr,Ba) atomic sheets, ionic bonds emerge, whereas between adjacent [NiP(As)]/[NiP(As)] layers covalent bonds occur owing to hybridization of $p$ states of pnictogen atoms.