The development of a non-toxic, efficient, cheap, and emerging class of semiconductor as solar absorber is vital for photovoltaic applications. The first-principle calculation method, based on the density functional theory (DFT) and the plane-wave method as implemented in the Quantum Espresso package has been used to obtain the structural, electronic, and optical properties of MgHfS3. From analysis, the band structure shows that the material has a direct band-gap with a value of 1.43 eV, which is in close agreement with the estimates of refractive index, reflectivity and extinction coefficient. A strong optical absorption coefficient of the order of 10(8) cm(-1) with wavelength of 540 nm in the visible region was predicted, reflectivity of 0.52, refractive index of 4.3 and extinction coefficient of 4.7 shows the optical potential of the compound when compared to other chalcogenide and halide perovskites. Hence, an attractive non-toxic, stable, and cost-effective material for photovoltaic application.