I know he was involved in a civil war with Pompey, but I wanted to know if it was exclusively this that caused him to become dictator.
Strictly speaking the legal issue that let him to being appointed dictator was that both consuls were out of the city and there was no magistrate competent to administer elections. Both consuls, Lentulus and Claudius, had fled the city with Pompey and much (but not all!) of the senate, and administration of the city would be impossible if new magistrates were not elected.
Suetonius in his life of Caesar gives a pretty unpleasant account of these elections, claiming Caesar basically nominated half the candidates and expected the "proper" outcome of the votes or else!
Appian says he only held the office for 11 days the first time, for the purpose of appointing magistrates.
What Caesar himself says is that he was named dictator while not even in the city.
There [Massilia] he was informed that a law was passed for creating a dictator, and that he had been nominated dictator by Marcus Lepidus the praetor.
Later
Julius Caesar, holding the election as dictator, was himself appointed consul with Publius Servilius; for this was the year in which it was permitted by the laws that he should be chosen consul.
Further
In accomplishing these things, and celebrating the Latin festival, and holding all the elections, he spent eleven days; and having resigned the dictatorship, set out from the city
Plutarch gives us almost no info on this dictatorship.
How you want to interpret these sources is of course up to you. I'm more than a bit of a fan of Caesar and I think he took the position with good intentions, but that can be argued endlessly and has been for more than 2000 years.
One last tangential thing: Caesar was never Dictator for Life. He was Dictator Perpetuo, i.e. dictator for as long as necessary. He always had the option (and possibly obligation) to resign that position when it became superfluous.