The crystalline structural, electronic and optical properties of the alloys Cu2ZnSn1−xGexS4, Cu2ZnSn1−xSixS4, Cu2ZnSn1−xGexSe4 and Cu2ZnSn1−xSixSe4 are calculated by first‐principles using both the generalized gradient approximation and a hybrid functional approach. We find that the electronic band structures are qualitatively very similar for these alloys. The band‐gap energy Eg(x) (for x = 0, 0.125, 0.25, 0.5, 0.75, 0.875 and 1) increases almost linearly with Ge and Si substitution. However, for very Si rich Cu2ZnSn1−xSixS4 alloys (but not for Cu2ZnSn1−xSixSe4) there is an abrupt increase of Eg(x) for x > 0.96. We therefore analyse this effect by calculating the electronic structures for x = 0.93, 0.96 and 1. We find that the Sn‐like states form localised density‐of‐states below the conduction band edge in Cu2ZnSn1−xSixS4, while corresponding states resonate more with the conduction bands in Cu2ZnSn1−xSixSe4. The effect in S‐based alloys is a direct consequence of the energetically high conduction band edge for Cu2ZnSiS4 in combination with energetically low Sn‐like states. Furthermore, the calculated dielectric constants are relatively similar for all alloy configurations. Overall however, our results suggest that it is possible to use Si and Ge as alloying element in quaternary Cu2ZnSnS4 to improve the photovoltaic properties.