What exactly do each of the mining resources do?
Each resource type adds a bonus to one rating area. Once you have sent a constructor to a resource, it will become a starbase. Adding mining modules will increase the bonus it provides. You can add mining modules by sending more constructors. There are 7 mining modules total and become available as you research the manufacturing techs. The bonuses are quite significant and really do make the difference between victory and defeat.
Grabbing those resources when you see them is a high priority. Adding mining modules to them is also a high priority. You still want to keep an eye on ones that are claimed because they'll "free-up" when the owner is conquered by another race. They also free-up when a race is at war since the AI likes to go after them right away. That means you need to defend your own and the best way to do that is to park fighters on top of them (you can add weapons and defense modules, but fighters are more effective). Sometimes they free-up when a race goes bankrupt which can happen during a war. When they lose a lot of planets, they can't support their military anymore and start losing their resources.
Here are the resource types;
Green - economy; increases income
Blue - influence; makes alien planets revolt and join your civilization (they flip)
Red - military; weapons have more firepower
Purple - research; get new techs faster
Yellow - morale; with happier colonists, taxes can be raised which means more income