No, actually, this is a very well understood problem. You can't calculate everything from first principles (we don't have a full many-body solution to any quantum mechanics problem) but you can get pretty darn close. (I'm using a lot of classical language below but I think it is good enough).
In a typical first semester undergraduate quantum mechanics class, you may spend a month on the hydrogen atom. Classically, the attraction strength of a proton falls off quadratically with distance (because space is three dimensional). Call that a "Coulombic potential well," toss it into the Schroedinger equation, and a few careful pages later, out pops the allowed energy states for hydrogen - discrete energy levels, and the shapes of the orbitals of those energy levels. Spend a few more days making corrections for relativity, magnetic interactions, etc. Add a second proton and you get the energy levels of helium (almost - the second electron screws things up enough that you can't get an exact answer from first principles). And so on. In practice, for larger atoms you measure the energy levels experimentally - shapewise they look almost just like those for hydrogen, but the energy differences vary.
What if you bring 2 hydrogen atoms together? If 2 hydrogen atoms are non-interacting (infinitely far apart) then they both have identical energy levels. Imagine bringing them closer together. The equations now allow for the possibility that both electrons are near one proton, or the other, or one near each. Remember, mathematically an electron is a wave the square of whose amplitude tells you the likelihood of finding it at that point. If an electron is at the lowest energy (ground) state derived for one hydrogen atom, it can "leak" a bit of it's wave-function into the ground state of the other - turns out there are a few ways to do this mathematically to get different states for the new "two coulombic well" potential. Turns out one of those has lower energy than an isolated hydrogen atom's ground state, and one has higher. The lower energy state has the electron mostly between the two protons (a bond) and the higher energy has it on both sides with the protons in the middle (anti-bond).
What if you have a crystalline solid - a periodic array of coulombic potentials? The same thing happens again and again and again as you add more atoms, and the individual, discrete states of single atoms get mathematically mixed in very specific ways. The discrete energy levels become bands of allowed energy levels separated by band gaps. You have to make a few approximations because the math is harder, but it works. This is the basis for all semiconductor device physics - you can readily derive diodes, transistors, LEDs, lasers, etc. this way.
Remember that light comes in photons with specific energies. Blue light has higher energy per photon than red. Photon energies less than the band gap can't be absorbed, because an electron that absorbed it wouldn't have a state of the right energy to go to (it would end up in the gap). Diamonds have a wide bandgap, and can absorb UV but not visible light, so they're clear. Graphite has a different crystal structure (different arrangement of atoms) and so a smaller bandgap.
This also explains colored diamonds. Add impurities like boron or nitrogen, and those atoms replaces carbon at some points in the crystal or end up where there shouldn't be atoms at all. This breaks the periodicity and can introduce states where you'd normally have band gap. The crystal can now absorb lower energy wavelengths because electrons can jump into the states caused by defects.Different defects make different new states. Because impurities can have more or fewer valence electrons than carbon, they can also increase electrical conductivity. In electronics, the process of adding impurities is called "doping." The change in electron density can also have an effect on the band gap. See http://www.webexhibits.org/causesofcolor/11A0.html