  An underestimation of the fundamental band gap values by the density
functional theory within the local density approximation and associated
approaches is a well-known challenge of ab-initio electronic structure
computations. Motivated by recent optical experiments [D. Santos-Cottin et al.,
arXiv:2301.08014], we have revisited first-principle results obtained earlier
for EuCd2As2 and extended the computational studies to the whole class of
systems EuCd2X2 (X = P, As, Sb, Bi), to EuIn2X2 (X = P, As, Sb), and to
nonmagnetic AEIn2As2 (AE= Ca, Sr, Ba) employing a hybrid functional method. We
find that our approach provides the magnitude of the energy gap for EuCd2As2 in
agreement with the experimental value. Actually, our results indicate that
EuSn2As2, BaIn2As2, EuCd2Bi2 and EuCd2SbBi are robust topological insulators,
while all other compounds are topologically trivial semiconductors. The trivial
band gaps of EuCd2P2, EuCd2As2 and EuCd2Sb2 are in the range of 1.38-1.48 eV,
0.72-0.79 eV and 0.46-0.49 eV, respectively. The topologically trivial Eu-based
systems are antiferromagnetic semiconductors with a strong red shift of the
energy gap in a magnetic field caused by the exchange coupling of the band
states to spins localized on the 4f-shell of Eu ions. Additionally, the EuIn2X2
(X = P, As) compounds show altermagnetic exchange-induced band spin-splitting,
particularly noticeable in the case of states derived from 5d-Eu orbitals.
