We posed the question to some of our favorite local gardening experts. First, they told us, prevent bugs in the rain barrel by employing a good lid with small netting. Window screening works well and can be purchased cheaply at any home improvement store.
If it's too late to try and keep them out, try a plant-, pet-, and beneficial insect-friendly pesticide that's commonly referred to as BT. Bacillus thuringiensis, which we're now using to combat leafminers and pillbugs that are waging war against our squash and bean plants, is a pesticide that targets garden pests but it safe for humans, pets, birds, and bees. You can drop about one quarter of a BT donut (available at nurseries) into your rain barrel to stave off mosquito populations. That said, be sure to only use BT for short periods of time to deal with pest populations, as completely eradicating nasty pests could potentially change your garden's natural biodiversity.