Genetics
The decision is based on the host cell's nutritional status.
It depends on a random mutation within the bacteriophage DNA.
The bacteriophage assesses the temperature and pH.
It is determined by a coin-toss mechanism inherent in its genetic structure.