Serbia bore the greatest responsibility for the outbreak of WW1. Serbian nationalism and expansionism were profoundly disruptive forces and Serbian backing for the Black Hand terrorists was extraordinarily irresponsible. Austria-Hungary bore only slightly less responsibility for its panic over-reaction to the assassination of the heir to the Habsburg throne.
France encouraged Russia's aggressiveness towards Austria-Hungary and Germany encouraged Austrian intransigence. Britain failed to mediate as it had done in the previous Balkan crisis out of fear of Germany's European and global ambitions - a fear that was not entirely rational since Britain had clearly won the naval arms race by 1910.
The generally positive attitude of European statesmen towards war, based on notions of honour, expectations of a swift victory, and ideas of social Darwinism, was perhaps the most important conditioning factor. It is very important to look at the outbreak of the war in the round and to avoid reading back later developments - the German September Programme for example (an early statement of their war aims) - into the events of July-August 1914.
More on this interpretation: