Yes it was, and one of the major underlying causes. Imperialism is the desire of a country and a people to expand their territory and their resources. Europe at that time was a continent with six separate and competing empires, all of which were pursuing the same things: land, resources and power. It was inevitable at some point that they would enter into armed conflict, as the world cannot sustain that many empires so close together.
In addition to imperialism, though, there were other equally important causes. Nationalism, or hyper-patriotism, the belief that your country was better than everyone else's and right no matter what, led to popular support for the war in each empire. A system of alliances between these empires led them to the belief that they could win such a war, and a gigantic and expensive arms race between them made war much more likely. But imperialism was the most important of these, in my opinion.
Nationalism, militarism and imperialism were the main causes of the war.
All countires wished to expand their borders. Germany's buliding of the dreadnaughts placed a huge pressure on its neighbouring countires.