Only female mosquitoes bite humans and animals; males feed on flower nectar.
Mosquitoes mean nothing personal when they take your blood. Female mosquitoes need protein for their eggs, and must take a blood meal in order to reproduce. Since males don't bear the burden of producing young, they'll avoid you completely and head for the flowers instead. And when not trying to produce eggs, females are happy to stick to nectar, too.