Queen is in charge of the entire colony and is responsible for its survival. This might be one of the main reasons when she (Queen) dies; the rest of the colony of ants dies.
Throughout the lifetime of the queen, she can lay off millions of eggs that will further hatch into other workers and soldier ants. No other member of ants can reproduce. This is why the queen plays the most crucial role in building the ants colony as her primary role is only to reproduce. Hence, if the queen dies, the chances of growth of their colony also die.
To understand this, you need to understand how ant colonies work. There are roughly 3 basic systemic units of an ant colony. Sure, these differ from species to species but overall, the trends remain the same. The three units are:
The Queen ant's main job is to lay eggs for adding new members to the colony. The larva becomes the future generation of the colony. The worker ants job includes gathering food for the larva and the queen, mating with the queen and protecting the colony. The lifespan of a worker ant is the shortest among the entire bunch. Once the queen dies, no more eggs are laid and the larva becomes the final generation of the colony. Once all the workers die off, the larva becomes the next generation of the workers and also subsequently, the last.
Hence ants die off after the death of a Queen Ant.