Hemoglobin's task is to bind with the oxygen in the lungs, transport it to the rest of the body and when release it. To do this, the haem group enters into a loose chemical bond with oxygen, which is easily released in surroundings where oxygen is in short supply.
Hemoglobin's is bright red when full of oxygen. Without oxygen, the molecule structure changes and with it the absorption of light that dictates its colour. This is why blood that is deficient in oxygen appears darker.