Various metamaterial absorber designs operating in the microwave, infrared, visible, and ultraviolet frequency regions have been proposed in the literature. However, only a few studies have been done on the metamaterials that absorb in both visible and ultraviolet solar spectra. A triple-band polarization-insensitive metamaterial absorber structure with semiconducting single-walled carbon nanotube as the dielectric layer is proposed to efficiently absorb the incident electromagnetic radiations in visible and ultraviolet frequency regions. A unit cell of this design comprises three basic components in the form of metal–semiconductor–metal layers. The metallic part of the structure is aluminum, and the (5,4) single-walled carbon nanotube is used as the semiconducting material. The electromagnetic response of the proposed design is numerically simulated in the visible and ultraviolet regions with the maximum absorption rates of 99.75% at 479.4 THz, 99.94% at 766.9 THz, and 97.33% at 938.8 THz with corresponding skin depths of 13.0, 12.8, and 12.9 nm, respectively. Thus, solar cells based on this metamaterial absorber can offer nearly perfect absorption in the suggested frequency regions. The simple configuration of the design provides flexibility to control geometric parameters to be used in the solar cell and possesses the capability to be rescaled for other solar spectrum.