Is transparency of material has something to do with inter- or intra-molecular bonding? E.g. both graphite and diamond are carbon, but graphite is opaque and diamond transparent.
Neither nor. Inter-, intra-molecular bonding types (van der waals, ionic, covalent, metallic bonding) are all playing minor or major role in a solid depending on its material (element mixture, inter-atomic distance, crystal lattice type...).
In the end the dielectric function will theoretically define the reflectivity, transparency, absorption of a solid for a specific wavelength of light for these types of bonding (ionic/electronic polarisation). Look at the picture and formula here.
Transparency is mainly defined by free electrons, position of Fermi Energy & type of bandstructure in a solid. For instance, metals (metallic "intermolecular" bonding) are often reflective and non transparent due to free electrons, their Fermi Energy is outside of eventual band gaps. Many isolators (ionic "intermolecular" bonding) have Fermi Energy within an energy band gap of >4 eV , but optical photon energy is around 1 to 3 eV. So electrons in valence band beneath the band gap cannot absorb these optical photons, the material is transparent. Many semiconductors have a band gap around only 1 eV, so their valence electrons can absorb photons.
Of course the main specific bonding types in an semiconductor will co-define Fermi Energy, band structure. But they are necessary, not sufficient factors for optical properties of solids. You can roughly classify solid types by their dominant bonding types (isolators-ionic/covalent, metals-metallic,...).