There are a multitude of reasons as to why flags may be flying at half-mast. If a national or universal tragedy has occurred such as the Sandy Hook shooting, flags fly at half mast. If it is an anniversary of a tragic day such as Pearl Harbor, the flags fly half-mast.
Flags fly at half mask as a sign of grief. Flags are flown at half mast when someone dies or there is a tragedy that results in public mourning. As an example flags were flown at half mast following several recent school massacres in the United States.