As noted, first check the batteries, Them make sure the flash is seated in the hot shoe and locked. Then look at cleaning the electrical contacts. It is even possible the lens electrical contacts on the lens and camera need to be cleaned.
If there is excessive wiggle with the locked flash, the rails of the hot shoe may need to be adjusted.
Also make sure the flash is fully charged before taking an picture. If the HV, High Voltage, capacitor is fully discharged, it can take a couple of seconds to recharge.