Flickering light bulbs are a common household electrical problem. Addressing the issue is a simple matter, but the approach you take will depend on the exact reasons for the flickering.
What Causes Flickering?
In general, flickering lights are caused by a simple drop or fluctuation in household voltage that causes the lights to dim momentarily. A variety of common issues can cause your lights to flicker, and understanding the specific causes will tell exactly what to do to solve it.
Fluorescent lights are more prone to flickering than LED and other bulb types. Temperature, bulb age, and warm-up cycles are common causes of fluorescent flickering. Small amounts of flickering aren’t a cause for concern, but if constant flickering or dimming are occurring, replace your fluorescent bulb to correct it. If the new bulb or tube flickers, it is likely that the fixture has a bad ballast. You can replace the ballast on old fixtures (upgrading to an electronic ballast in the process), but it's usually simpler to replace the entire fixture.
Dimmer switches are a common source of flickering with LED bulbs. Older dimmer switches and current conventional dimmers are designed for use with incandescent light bulbs, and they often don't work well with LED bulbs. If your LED is controlled by a dimmer, the easiest fix is to buy a good-quality "dimmable" LED bulb. If that doesn't solve the problem, replace the old dimmer with a new dimmer designed for LED bulbs. You will still need to use dimmable LEDs, but the new switch will be optimized for LEDs and likely will give you better performance.
Bulbs that aren't screwed in all the way or are otherwise attached incompletely can make for a weak electrical connection with the light fixture's contacts, resulting in flickering. Simply tightening the bulb usually solves this problem. If this occurs with a fluorescent tube, try rotating the tube in the fixture mounts to make sure the metal pins on the ends of the tube are making good contact.