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,...).
Although it's not strictly what happens, you can think of the bonds around a carbon atom as repelling each other because the electrons localised into those bonds want to get as far away from each oither as possible. That's why when a carbon atom forms three bonds you get the bonds separated by 120º. When you have four bonds they arrange themselves into a tetrahedral shape with an angle of about 109º between each pair of bonds.
It is possible to force the bonds closer together, and molecules, like cyclobutane, exist that have a four carbon ring. However these tend to be more easily attacked by reagents than five or six carbon rings, so they tend to be unstable. These molecules have only two bonds separated by a 90º angle, with the other two bonds at more like the usual 109º and in a plane at right angles to the two 90º bonds. I don't know of any molecule with four bonds at 90º in the same plane. My guess is that the energy of this arrangement would be so high it would spontaneously reorganise to something more stable.
Best Answer
The answer lies in the band structure of the two materials. The band structure describes how the electrons in a solid are bound, and what other energy states are available to them.
Very simply, the band gap for transparent diamonds is very wide (see this link):
Normally, diamond is not a conductor: all the electrons live in the "valence band", and you need a photon with at least 5.4 eV of energy to push an electron into the conduction band. In the process, that photon would be absorbed. A photon with less energy cannot give its energy to an electron, because that electron "has nowhere to go". And since visible light has energies of between 1.65 and 3.1 eV, only UV photons have enough energy to be absorbed by pure diamond.
That same link also describes how impurities give rise to color in diamond: for example, nitrogen atoms produce an "intermediate" energy level, and this gives rise to more energetic electrons that could jump the gap to the conduction band and absorb light.
By contrast, graphite is a conductor. As a conductor, it has electrons in the conduction band already. You know this, because even a tiny voltage will give rise to a current - this tells us that the electrons didn't need to be "lifted" into the conduction band first. And since electrons will absorb any amount of energy easily, the material absorbs all wavelengths of light: which makes it black.