Unfortunately you do not say under what circumstances the lights flicker on and off. If it is as the engine is increasing or at higher speeds it could be due to an overcharging alternator. Other than that poor electrical connections possibly corroded while the car was out of use could well be the problem.
sounds like an electrical problem take it to one of the chain part stores and they will run a free test that will tell you why the lights are coming on the dash