Lead-free halide double perovskites (HDPs, A2B I B III X6) with attractive optical and electronic features are regarded as one of the most promising alternatives to overcome the toxicity and stability issues of lead halide perovskites. They provide a wide range of possible combinations and rich substitutional chemistry with interesting properties for various optoelectronic devices. However, the performance of state-of-the-art lead-free HDPs is not yet comparable to that of lead halide perovskites, especially in the photovoltaic field. One of the main reasons for this is that HDPs usually have large and/or indirect bandgaps, which limit their optical and optoelectronic properties in the visible and infrared region. In this thesis, we attempt to modify the bandgap and optical properties of HDPs using metal doping/alloying and crystallization control, as well as provide detailed understanding of the alloying at the atomic level. We also observe significant changes of the bandgap of HDPs at different temperatures (i.e., thermochromism) and uncover the reasons behind it.