"God in His wisdom made the fly, and then forgot to tell us why." I gather He wanted us to figure it out for ourselves.
JSTOR reports that mosquitoes may actually be good for something. Two things.
MacDonald cites a study that found that mosquito larvae were part of the ecological balance in stagnant water: without them protists multiplied like mad and some bacteria which the protists ate dropped in numbers. They're not sure yet what the consequences of that could be.
And apparently they are sometimes pollinators too.
Only female mosquitoes suck blood and that phase only lasts while they are breeding. Most of the time, mosquitoes of both sexes eat plant nectar, making them important pollinators as they move from plant to plant. Some orchids, for example, rely heavily on mosquitoes, and these rare plants would be at risk without their buzzing partners.
I'm still going to swat them. I've had malaria already, thank you, and I don't want West Nile. Or even a tiny welt.