  Layered two-dimensional (2D) materials, particularly MX$_2$ transition metal
dichalcogenides (TMDCs), where M represents Mo or W and X is S, Se, or Te,
exhibit unique properties when configured into hetero- and homo-bilayers with
diverse stacking arrangements. This study emphasizes the impact of "magic
angles" in twisted homobilayers that lead to transformative Moir\'e patterns,
crucial for manipulating material properties. Our computational analysis of
heterostructures covered 30 combinations from six MX$_2$ types, revealing that
both the materials' choice and stacking significantly affect stability and band
gap energy (E$_g$). Notably, the MoTe$_2$/WSe$_2$ heterostructure with a
60$^{\circ}$ twist demonstrates a direct E$_g$, underscoring its potential in
novel applications. In homobilayers, both fully relaxed and low-strain
scenarios were examined across various stackings and twists. We found that
optimal bilayers' E$_g$ is highly dependent on stacking alignment.
Particularly, 1T-MoS$_2$, WS$_2$, and WSe$_2$ can exhibit direct or indirect
E$_g$ under specific twisted conditions, with 1T-MoS$_2$ showing a capability
to transition between semiconductor and conductor states. Specific "magic
angles" at 17.9$^{\circ}$ and 42.1$^{\circ}$ in twisted WS$_2$ and WSe$_2$
bilayers form symmetrical Moir\'e patterns, enabling fine-tuning of E$_g$
through angle adjustments and influencing electronic band flatness. Compared to
monolayers, these TMDC bilayers display enhanced stability, which can be
strategically adjusted. The use of controlled twisted angles in these bilayers
emerges as a powerful tool in materials engineering, offering precise control
over various electronic properties.
