It is important to flash your brake light when:

It is a good idea to flash your brake light before slowing if someone is following you too closely. The other driver may be focused on you and be unaware of the upcoming hazard that is causing you to slow down. It is also important to flash your brake light if you are about to slow down in a place where other drivers might not expect you to do so.
DMV Writen Test