In this investigation, we employ density functional theory (DFT) with the generalised gradient approximation of Perdew–Burke–Ernzerhof (GGA-PBE) and the modified Beck-Johnson approach (mBJ-GGA). Our focus is on examining the optoelectronic and thermoelectric properties of Bi4Fe2Hf4Pt2 and Sb4Fe2Hf4Pt2 compounds. The findings indicate that both compounds are stable in non-magnetic phase (NM). Regarding electronic characteristics, it is revealed that these compounds are direct bandgap semiconductors. The optical analysis suggests that these compounds demonstrate high reflectivity within the visible and ultraviolet spectra, rendering them promising candidates for solar cells and photovoltaic applications. Furthermore, these materials present as highly promising candidates for thermoelectric purposes due to their remarkable figure of merit (ZT) and notable Seebeck coefficient (S) values. However, there is a lack of theoretical or experimental data available for these compounds for conducting comparison with our results. We think future experimenters attempting to synthesise these chemicals experimentally will benefit from the current study.