Where can we use the Bayes' theorem in artificial intelligence?
A toy example:

Suppose an agent has information about the reliability of fire alarms. It may know how likely it is that an alarm will work if there is a fire i.e. $P(alarm | fire)$. But, if the problem is tweaked a bit and if the agent must know the probability that there is a fire, given that there is an alarm, it can use Bayes' rule:

$P(fire | alarm) = [P(alarm | fire) ×P(fire )] / P(alarm )$

where:

$P(alarm | fire)$ is the probability that the alarm worked, assuming that there was a fire. It is a measure of the alarm's reliability.

The expression $P(fire)$ is the probability of a fire given no other information. It is a measure of how fire-prone the building is. 

$P(alarm)$ is the probability of the alarm sounding, given no other information.