It depends:
Is your HMG screened by squads in front of it? No cover might suffice.
Does your HMG have to cover a part of the map alone? Green cover becomes very valuable here, especially if opponent sends a blob. Green cover not only gives much greater survivability but also mitigates the effect of deathloop where the gunner get continually sniped.
Is it early game? Clumpy yellow cover could work as there isn't much risk of nades or other explosives yet. Otherwise it should be avoided.
Does opponent have rocket arty? Green cover becomes a bad idea cause rocket arty has full damage against green cover. There are also other units that are strong against green cover like flamethrowers or AVRE.
Yellow cover from craters is almost always a good idea because it doesn't tend to let squads clump up, unlike most natural yellow cover.
The green cover bonus on gunshields is strange and you shouldn't rely on it. It only works from certain angles in certain cases.
I have been guilty of not putting an HMG that is covering a star behind green cover, then getting wiped by a blob of infantry. That makes sense. Do you recommend leaving an HMG behind to cover a point of interest, such as stars/fuel/muni? I also try to put mines on flanking routes, but should I be constantly pushing/moving up with them to be aggressive?