Nectar, fruit juices and other plant fluids are all high in sugar which the mosquito uses to maintain their energy. The blood is used when the female needs to lay eggs. When a female pierces your skin with her mouthparts, she first injects a small amount of salvia or spit into the wound. The salvia makes it easier for her to slide her snout into your skin. After she leaves, your body has an allergic reaction to the saliva, causing itching, swelling and finally a bump.
Female mosquitoes find people to bite by following air trails of carbon dioxide.
Carbon dioxide is the gas that all animals exhale when they breathe. So just by breathing, we make ourselves targets to mosquitoes. Mosquitoes are harmful for another reason as well. Because they drink our blood, they can transmit diseases to us as well. Malaria is an infamous disease that is still very common in some parts of the world.