Structure and optical properties have been successfully determined for a series of niobium- and tantalum-containing layered alkaline-earth silicate compounds, Ba3(Nb6−xTax)Si4O26 (x = 0.6, 1.8, 3.0, 4.2, 5.4). The structure of this solid solution was found to be hexagonal P-62m (No. 189), with Z = 1. With x increases from 0.6 to 5.4, the lattice parameter a increases from 8.98804(8) to 9.00565(9) Å and c decreases from 7.83721(10) to 7.75212(12) Å. As a result, the volume decreases from 548.304(11) to 544.479(14) Å3. The (Nb/Ta)O6 distorted octahedra form continuous chains along the c-axis. These (Nb/Ta)O6 chains are in turn linked with the Si2O7 groups to form distorted pentagonal channels in which Ba ions were found. These Ba2+ ions have full occupancy and a 13-fold coordination environment with neighboring oxygen sites. Another salient feature of the structure is the linear Si–O–Si chains. When x in Ba3(Nb6−xTax)Si4O26 increases, the bond valence sum (BVS) values of the Ba sites increase slightly (2.09–2.20), indicating the size of the cage becoming progressively smaller (over-bonding). While SiO cages are also slightly smaller than ideal (BVS range from 4.16 to 4.19), the (Nb/Ta)O6 octahedral cages are slightly larger than ideal (BVS range from 4.87 to 4.90), giving rise to an under-bonding situation. The bandgaps of the solid solution members were measured between 3.39 and 3.59 eV, and the x = 3.0 member was modeled by density functional theory techniques to be 3.07 eV. The bandgaps of these materials indicate that they are potential candidates for ultraviolet photocatalyst.