The processes mediated by the weak interaction have significant implications in nuclear physics, astrophysics, and particle physics. In particular, the electron capture (EC) plays a prominent role in driving the dynamics of core-collapse supernovae, while the β-decay determines the time scale of the nuclear r-process. Both processes are influenced by the underlying nuclear structure through the spin-isospin excitations and the associated resonances. The main aim of this work is to establish a theoretical framework for obtaining the spin-isospin transition strength at finite temperature and its extension to the description of stellar electron capture and β-decay. The nuclear ground state at finite temperature is determined by solving either the relativistic Hartree-Bogoliubov (FT-RHB) or Hartree Baarden-Cooper-Schrieffer (FT-HBCS) equations, while the relativistic quasiparticle random-phase approximation (FT-pnRQRPA) in the charge-exchange channel is developed to determine the excited states. The new theoretical approach combines the effects of nuclear pairing, finite temperature, and deformation. The limits of nuclear stability (drip lines) for hot nuclei are studied within the FT-RHB supplemented with the subtraction of continuum. Investigated spin-isospin excitations include the Fermi and Gamow-Teller (GT) transitions. While the Fermi transitions display one resonance peak independent of temperature and deformation, the GT transition strength has a much richer structure, more sensitive to the temperature and deformation effects. When considering the spherically symmetric nuclei, the GT strength separates into a low-lying, and a resonance region, as exemplified for even-even tin isotopes. However, the deformation effects lead to a substantial fragmentation of the GT transition strength, as demonstrated for selected pf-shell nuclei, exhibiting a crucial role of the nuclear shape. Results are presented for the EC rates of nuclei near the N = 50 shell closure, with subsequent implications for the supernovae simulations. The large-scale β-decay rate calculations are shown for even-even nuclei in the range 8 ≤ Z ≤ 82, displaying how the β-decay half-lives change with temperature and stellar density. Our study highlights the complex interplay between temperature, nuclear pairing, and deformation effects with subsequent implications for weak-interaction rates and their implementation in astrophysical models. Rad ne sadrži sažetak na drugom jeziku.