The hydrogenated amorphous carbon-silicon alloys [a-SixC1-x(n):Hy] and [a-Six(n):Hy] layers were investigated in order to prove the feasibility to widen the optical band gap in emitters of the heterojunction solar cells. The alloys were fabricated by decomposition of silane (SiH4), phosphine (PH3), methane (CH4), and hydrogen (H2), using a plasma enhanced chemical vapor deposition. Particularly, we focused on the incorporation of hydrogen and carbon within the resulting [a-SixC1-x(n):Hy] and [a-Six(n):Hy] films, which later form the emitter. The corresponding local vibrational modes of Si-Hx, C-H, and the corresponding network have been analyzed by μ-Raman spectroscopy. The addition of carbon degrades the photoelectronic properties in the emitter layer. This deterioration can be minimized by H dilution. The resulting optical band gap EG as well as the thickness of the emitter were determined by spectroscopic ellipsometry. It was confirmed that the band gap EG can be tailored by using an appropriate gas mixture during the decomposition. Furthermore, we analyzed the I-V characteristics of the prepared heterojunction solar cells. A trade-off between the electrical defects density and the optical losses induced an improvement of the I-V characteristics with increasing carbon and hydrogen concentration in the feedstock during the deposition.