There are two main examples of the suspension of the writ of habeas corpus in American history. One of them could more easily be applied to today than the other.
The first of these examples of suspension occurred during the Civil War. In this case, President Lincoln suspended the writ (and then Congress did so later on) in response to the state of war that existed within the United States at the time. The other important example of suspension of habeas corpus was in World War II. Then, habeas corpus was suspended with regard to people of Japanese descent on the West Coast. The rationale was that they might serve as a “fifth column” that would aid Japan in attacks on the US.
This second instance of suspension might arguably apply today. In that case, there was no state of war within the US. However, the government suspended habeas corpus so as to prevent people within the US from helping an enemy outside of the country. It could be argued that potential terrorists within the US are in a similar situation because they might help a foreign enemy to carry out attacks on the US.