When should we choose agglomerative clustering over K-means clustering?
You can see this comparison table in sklearn, which gives some intuition about where and when each algorithm is successful:

It might be a good idea to try both and evaluate their accuracy, with an unsupervised clustering metric, like the silhouette score, to get an objective measure of their performance on a specific dataset.
Some other major differences are:

K-means performs better for 2D &amp; 3D spheres
Hierarchical clustering can have reduced performance on larger datasets
Hierarchical clustering is sensitive to outliers