It's never pleasant to see bugs in light fixtures whether they are dead or alive. The bugs may have been sitting there for months or even years, and they certainly don't add to the aesthetics of your space. Cleaning bugs out of bathroom lights is not a pleasant chore, so you should do everything you can to keep them from getting in there in the first place.
Bugs in Light Fixtures
Why are bugs attracted to light anyway? A bug's attraction to light is due to a phenomenon called phototaxis. Phototactic insects are instinctively drawn toward or away from light. The ones that hang out near porch lights and indoor lights are positively phototactic. Phototaxis also explains why cockroaches scatter when lights are turned on – they are negatively phototactic
Bugs get into ceiling light fixtures in bathrooms and other rooms via wires and holes. When light fixtures are installed, wires have to be run through the ceilings, and this requires holes. Bugs come in through these holes and then move toward the source of the light. They end up behind the covers and then die because they cannot escape, because they have no food or because of the heat.
Outdoor lights may also present a problem. If you have bugs in your outdoor lights, try different kinds of light bulbs since bugs are not as attracted to yellow light. LED bulbs can also be very effective because they are less visible to insects. You can also look for bulbs specifically designed to keep bugs away.
Preventing Bugs in Light Fixtures
If you want to clean out your light fixtures, you will need to wear protective goggles and gloves because the cover may be full of dust and debris in addition to the dead insects. First, lay down a drop cloth and then stand on a step stool or small ladder and remove the cover. See how the cover is attached; it is probably held there with screws.
Empty out the debris and clean it with a spray made from equal parts vinegar and water. You can also replace the bulb if need be before reinstalling the cover.
If you want to take some preventative measures to keep bugs out of your light fixtures in the future, you may seal any gaps in the wall. Be sure to turn off the electricity first and then take off the cover and remove any bulbs. Pull the fixture from its electrical box behind its base plate. Then, seal the gap between the box and the wall. This may be accomplished using acrylic latex caulk. Once this has been done, you may then replace the fixture.
Prevention Measures for Skylights
If you have bugs in your skylight, you can seal the trim around it or seal the junction of the skylight's box. Bugs can get into recessed lights too, though this is not as common.
You can prevent them from getting in by removing the trim plates and sealing the fixture-to-ceiling junction. Be sure not to seal the air vents, though, because these are needed for safety reasons.