I usually know why, but I sometimes disagree with the decision. For instance:
In a recent game, I was maybe 4th or 5th in terms of soldiers (playing on a small map, so only 6 civs in total). That made me weaker than most civs. Then Denmark, who was 1st in soldiers, declares war. Now, I know this happened because Denmark had more soldiers and I had fewer. But there was no "covets your land" in play, primarily because I was close to the opposite side of the pangea from him. And the declaration came without any Danish soldiers on my border, meaning he still had to move his army quite a ways. I had a small but growing lead in technology, so that was probably another reason. But ultimately, it was a stupid DoW, because the lead Denmark had in soldiers was more than offset by me having both a tech lead as well as plenty of time to build units because of the time it took him to move his army.
Ever since G&K, I see more of this "I'll declare war on you, but my army is no where near your borders" nonsense from the AI. Even had his army been near my borders, the distance to his own civ was pretty far if he had taken any of my cities, making the decision to attack me already a questionable one. But his army didn't show up until many turns later.