Experimental and theoretical studies show that two-dimensional (2D) materials have great potential applications in the fields of optoelectronics, semiconductors and spintronic devices. Based on the First Principles, the stability, band structure, electronic properties and optical properties of hydrogenated C3B, a new graphene like two-dimensional (2D) material, are studied in this paper. The results show that: firstly, with the increase of hydrogenation degree, the sp2 orbital hybridization in C3B structure gradually transits to a more stable sp3 mode, and the valence band energy near the Fermi level decreases; Secondly, adsorbed H atoms can regulate the bandgap of C3B. When the number of adsorbed H is even, C3B structure behaves as a semiconductor, and meanwhile the bandgap increases. When H atoms is odd, C3B is easy to show metallicity; Finally, the main absorption peak of the optical absorption spectrum decreases first and then increases with the increase of H concentration. The law of the secondary absorption peak is opposite to the main peak. When the ratio of hydrogenation is 50%, an obvious secondary absorption peak appears. This study confirms that hydrogenation is an effective way to regulate the electronic properties of materials, which can expand the application of 2D material C3B in optoelectronic devices.