I'd recommend starting by replacing the bulbs to rule out any issues with them.
Assuming the bulbs has been ruled out, it sounds like a bad electrical connection. If it is affecting many lights, then it's likely upstream, perhaps at the switch, but if not, in another connection point. Could even be in a receptacle along the same circuit.
Do you know if your house uses aluminum wiring? If so, you should contact a qualified electrician since AL wiring requires some expertise, and the dimming lights are a good sign that there is arcing occurring which can be a fire hazard (it could be a fire hazard with copper too, but much more common with aluminum).
If your house is wired with copper, you can start by first turning off the power at the breaker, and then inspecting all of the connections at each light fixture and the switch. Look for lose or corroded connections. You're going to need to work backwards from the fixture to the panel, until you find a cause.
Based on the info you provided, it could be a lose connection with either the hot or neutral wire. If you observe the bulbs getting brighter than normal, that is usually a sign of a open/lose neutral wire.
Lose connections usually cause arcing, which can cause a fire, so this is not something I'd leave indefinitely. If troubleshooting this is outside of your skillset, it's always best to contact a licensed electrician.