Bees eat pollen and nectar, using their stinger and venom for defense. Wasps, related to ants, are actually carnivores and can use their stinger for defense and stunning prey, which is why stinging doesn't kill wasps.
Mosquitos don't actually bite, female mosquitos pierce the skin to drink blood and gain nutrients vital to laying eggs. Male mosquitos are herbivores.
Biting flies bite for food, and are unrelated to houseflies, which have no biting parts (houseflys reguritate digestive fluids onto food, and "lap" the resulting mixture).