The situation and location will determine if bugging in or bugging out is the better option.
For short term stuff, bugging in is generally the better option. Wait it out with all your supplies.
Some things like Chemical leaks or flooding or something that makes the area unsafe or unsustainable, or inhospitable will force a bug-out.
Area affect is also a factor, does bugging out mean just the general vicinity? (Truck wrecks and chemicals make it necessary to bug out) or is it something that covers a large geographical area or the whole country (Economic collapse, super volcano?).
The times it will be difficult to determine will most likely be during long term shtf (Economic collapse, depression etc). When people are starving after the first few weeks and months, they will get desperate and then it's very dangerous to be in populated areas. Situational awareness and keeping an eye on current events may give a better idea if it's time to bug out and beat the crowds so to speak (Hurricane for example). If you get started quicker you can get out of the area before it's choked by all the last minute evacuees.