Well, practically everything in chemistry has something to do with electrons. I still have to say that it's an overly broad question.
Group VII vs. Group IV: do you mean, isolated atoms, pure elemental substances, or what? A general observation is that atoms prefer to form completed octets - although this in itself isn't a very satisfying explanation. To wit: both fluorines in F2 have full octets, as do all the carbons in diamond. Fluorine gas, though, is certainly more reactive than diamond. So this in itself isn't a good explanation. There are a lot of ways you could explain these differences. We must also again define what we mean by "stability". There is thermodynamic stability and kinetic stability. Mixtures of gasoline and oxygen are not thermodynamically stable, but they are kinetically stable. The phase of the material also makes a big difference: gasoline is far more reactive when it is aerosolized versus when it is a liquid, which is why it is nebulized in an engine prior to ignition. Therefore, even based on phase alone, comparisons between Group 4 carbon (diamond) and Group 7 (fluorine) are not necessarily fair. Diamond is a solid and fluorine is a gas. Based on that alone, we might expect varying degrees of reactivity.
Back to the point, when comparing one element to another, what we might mean to do is compare the strenghts of bonds between atoms. This certainly has much to do with electronic structure, and we may even begin to answer such a question in a general way. But speaking of reactivity in isolation still doesn't make much sense. With the exception of some decomposition reactions, must reactions require at least TWO molecules to tango. Fluorine may be a reactive gas, but only in the presence of other reactants. A vial of pure fluorine will last indefinitely. So, in almost all cases, we must specify the conditions and context to understand a vaguely defined concept like "stability".
So, in short, while we may typically think of the Group VII elements as "reactive", and generally this has to do with the weakness of covalent bonds between atoms in this group (compared to more polar/ionic bonds between atoms in this group and atoms in other groups), which in turn has a lot to do with electron-electron repulsion, it's better and more instructive to consider more specific comparisons.