Where is the blue flash coming from, the toaster or the power outlet as you said that it also occurred with other appliances?
If the blue flash is coming from the power outlet (have you tried other outlets?) then it may be due to a faulty outlet, get an electrician to check it out.
If from the appliance, do you have a DMM (digital multimeter) and know how to use it?
If not, do not use the toaster until it is proven electrically safe to use.
If so use it to check that the toaster is electrically safe by disconnecting the toaster from the power supply and then connecting the meter’s test leads between each of the two power pins (active and neutral) on the power cord plug of the toaster (one at a time) and any metal point on the toaster itself. Manually operate the toaster to simulate that it is operating - operate the bread holder lever and then check that there is no continuity i.e. open circuit (OL), shown on the meter when using its Ohm’s function.
If it tests OK then a blue flash is coming from the toaster usually indicates that there is still power being applied across a switch etc when it opens and there shouldn’t be. The toaster would need to be opened and further inspected to find out why.