Just about anything you'd want to do in AI and more. This is useful for building several types of complex expert systems, such as configuration and scheduling systems. The inference engine goes though a cycle of looking for rules whose conditions are met, and then taking the appropriate actions. Prolog handles these easily with unification, backtracking, and recursion. The search for rules that match proceeds via unification and backtracking, making the most complex part of the inference engine very simple.
Recursion handles the looping.
Just about anything you want to do in AI requires pattern-matching and search, and that is what Prolog does best. These too are pratical and enjoyable to implement in Prolog. Once a developer grasps a good conceptual model of how Prolog really works, all of the language's possibilities become clear. In the AI industry we have created many neat programming tools, none of which have taken off as we hoped. Quite possibly it is because the languages try too hard to be something they are not.