Ab initio calculations based on density-functional theory have been employed to study structural and electronic properties of Bi4Ge3O12 (BGO) and Bi4Si3O12 (BSO), as well as their optical characteristics in ultraviolet region, up to 40 eV. The electronic structure around the band gap is found to be similar in both compounds, dominated by the O p- and the Bi s-states (valence band top) and the Bi p-states (conduction band bottom). The gap is found to be indirect in both BGO and BSO. The optical spectra are analyzed, compared, and interpreted in terms of calculated band structures. It is shown that the absorption process involves significant energy flow from the O ions to the Bi ions. This fact stresses importance of the first neighborhood of the Bi (six O’s forming an octahedron), which is more distorted in the BSO than in the BGO. The latter difference is mainly responsible for the different absorption characteristics of the BGO and BSO. [ABSTRACT FROM AUTHOR]