蚊虫 is more formal/written than the spoken
蚊子. It also leans collective/general — 'mosquitoes (in general), biting bugs' — as opposed to
蚊子 which works fine for one mosquito. Common in public-health and product copy:
蚊虫叮咬 (mosquito bites),
防蚊虫 (mosquito-proof).