This is going to be long. And when I say long, I mean really long. So I'll put a tl;dr right up at the top, for readers. This will be 8 posts (7 will be very text-heavy), so don't expect a short response!
In document form: http://www.scribd.com/doc/224419773/The-Outbreak-of-the-Six-Day-War
tl;dr: Water crises, fedayeen border flare-ups, false intelligence reports, fears of nuclear weaponry introduction, defense pacts, mobilizations, UN peacekeeping force expulsions, and back-and-forth raids/border clashes all contributed to the war and the decisions made in leading to the Six Day War (as well as history like the Suez Crisis, of course, but I don't go that far back).
As I said, I cannot explain them all, so I'll explain mostly the events of 1964-1967 as contributors, and describe how they contributed. I won't go as far back as the Suez Crisis really. You'll see what I mean as I go. Without further ado, let's begin!
The Water Crisis
No, I'm not referring to the water passage of the Straits of Tiran, or the Gulf of Aqaba. I'm talking about water for irrigation, drinking, crops, etc. The Middle East has perpetually suffered from crises related to water, some of which plague it today. Moshe Shemesh has an article on this that I feel is very important in explaining the prelude to the war, which I'll explain now.
While not directly responsible for the war by most accounts, the struggles over water led to deteriorations in the relations between Israel and the Arab states, which had already been strained, to say the least. The Arab world viewed the Jordan river as a key element in the overall Palestinian problem and Arab-Israeli conflict. It flows through what was a demilitarized zone (until the Six Day War) west of Israel's border with Syria, then flows down through the Sea of Galilee before forming the border between Israel and Jordan and the border between the West Bank and Jordan, ending at the Dead Sea. Until 1956, only fourteen percent of the river was used for irrigation. Due to Israeli attempts to divert the river to their advantage in 1953, there was a big hub-bub about the way to best divide it up, which I won't go too in-depth to. However, we pick up that story in January 1964, when the First Arab Summit came to three key conclusions:
An "Authority" would be set up to exploit the waters of the river and its tributaries. Dr. Ahmad Salim, the chairman of the "Authority" estimated that the cost would be roughly 70 million pounds for the plan he detailed, and that it would take 8-12 years to complete.
A Joint Arab Command would be set up as soon as possible to coordinate the Arab armies, and defend their diversion of the river. All Arab states would be obligated to help, and 154 million pounds would be set aside for arms procurements by Lebanon, Jordan, and Syria. In September of 1965, the Arab Defense Council ratified the Joint Arab Command's strategy for defending the river.
The representative of the PLO to the Arab League (Ahmad al-Shuqayri, also chairman of the PLO as elected in May) would keep contacting member states of the Arab League and working with Palestinians on the plan to liberate "the national homeland" and make it a Palestinian state.
Basically, this whole plan was a response to Israel's attempt to divert the river themselves. The Arab states set up military defenses for this plan, and tried to avoid a war, but didn't want to lose out on water resources. However, they were unable to do this, mainly because they feared Israel's air superiority at the time, and found at the Third Arab Summit (September 1965) that the Arab leaders were in a dilemma; they wanted to keep trying to divert the river, but apparently couldn't pull it off over Israel's tactics.
Egypt's leader, Gamal Abdel Nasser, formulated a new plan to handle this problem. His plan, based on two stages, handled the diversion in the first stage and "the liberation of Filastin" in the second. The first stage was to strengthen the Arab armies to ensure they could defend their actions, especially in Jordan, Syria, and Lebanon. The JAC commander said this would take roughly 3 years, being completed around late 1967 or early 1968. 150 million Egyptian pounds were earmarked for the task. The first stage also called for concentrating Saudi, Iraqi, and Syrian troops in Jordan and Lebanon in preparation for any attack (the plan also placed all troops on alert), and planned to immediately begin the technical aspect of diverting the river. Nasser hoped this stage would deter Israel, and prevent border struggles, while allowing diversion of the river.
The second stage, on the other hand, decided that the final objective was to "liberate Filastin from Zionist imperialism", and the JAC commander was told to draw up plans to destroy Israel. The plan was ratified at the Third Arab Summit, where 200 million pounds were budgeted to shore up the Syrian, Jordanian, and Lebanese armies so they could easily change from defensive to offensive positions after the first stage.
Lebanon, however, dawdled in implementing its part of the plan. They were criticized heavily for it by the Egyptians, but feared implementing the plan. They said they were ready to do so, but had not received the order from the JAC, among other things (they were really stalling because they didn't want to make the "Filastin Question" a bone of contention between their Christian and Muslim populations). It was only in March of 1965 (roughly 6 months after the Second Arab Summit had also resolved to start the diversions) that Lebanon began its plans. Lebanon once again dawdled around May of 1965, asking Nasser to cancel the plan for the diversion because of fear over Israel's response. Israel had made strikes against the diversion operations in March and May of 1965, leading Lebanon to fear further retaliation, and Nasser allowed it saying that "If the Arab states cannot face Israeli attacks then we have no [choice] but to postpone diversion of Jordan's tributaries until our military preparations are completed." Even still, Lebanon continued work until it called a halt on July 4, 1965, due to Israeli overflights/strikes, and intense U.S/French pressure. They blamed budgetary restrictions, and backed off.
Syria had even more trouble implementing the plan. On November 13, 1964, in a disputed border area, Syrians fired on Israeli bulldozers. Roughly a week earlier, November 3, Syrians had opened fire on an IDF patrol in the same area. The IDF responded with fire, including tank shelling (which missed by 700-800 meters). This escalated until the Israeli Air Force (IAF) intervened, in an event that was different...mainly because Israeli air forces had never entered deep into Syrian territory for daily security needs as they did then to silence the artillery (until November 13, 1964, this was unheard of since the 1950s). The Syrians, undeterred, continued their diversion attempts.
However, the next IDF action on March 17, 1965, changed that plan up a bit. An Israeli tractor driver was killed in escalating fire between the two sides, which peaked on March 16, and he'd been killed by artillery fire. The IDF had prepared a battle plan for this occasion already, and implemented it on March 17. The plan was to use any border attack as an excuse for tanks to fire on the diversion equipment being used close to the border, since tanks wouldn't have to cross the border to fire back. The air force was not used in the plan, though it was placed on alert in case of artillery fire. The idea was that a patrol would be fired on, as the Syrians had been doing since February, and that did happen on March 17. The Syrians failed to react to the tank fire (from 2000+ meters away, tanks fired and hit the diversion equipment, since they'd upgraded their tanks after the November failures), and the Syrians halted their work in the area as a result. The diversion operations were ceased until March 31, when they cleared 500 meters of the river, then removed all equipment. On April 15, they started again, and Israel decided they would provoke another attack to stop the diversion operations. They sent a patrol out, but the Syrians refrained from firing, so the Israelis opened fire. Despite the 5000-5800 meter range, in the ensuing firefight the tanks managed to take out three bulldozers among other equipment, and the Syrians didn't respond out of fear of the IAF. On May 22, Syria ceased operations again, and moved to another area. They worked there until July 15, before moving yet again, to an area 10km from the border. The Syrians figured the Israelis wouldn't attack, since they'd have to call in the air force to do it. On August 12, they began plowing work. When observers claimed the Syrians were pointing their weapons at Israeli forces, the Israelis opened fire (no air force used) and destroyed two bulldozers and three tanks. After this, the Arab diversion plan was effectively dead, though small amounts of work continued. On July 12, 1966, an Israeli security vehicle hit a mine, and two soldiers and a civilian were killed. These mines, among other sabotage attacks, were the work of Fatah, which was an organization the Syrians were supporting in border incursions (I'll talk about them later). This time, an attack on Syria was approved, using the air force as well. For the first time in aerial warfare, a Mirage shot down a MiG-21, and the Israelis destroyed Syrian equipment with great success.
Jordan, by the way, had implemented only the portions of the plan that Israel had presented in its own division plans (Israel's proposal, called the Johnston Plan, was rejected by the Arabs). Jordan therefore avoided any real issues over water at this stage.
As you can imagine, this was pretty significant. Tensions flared, water became a huge issue, relations deteriorated, and military buildups were encouraged. Now, let's look at other border issues.
I'd recommend reading Six Days of War by Michael Oren. I'm sure someone will chime in about Oren's bias. He's the Israeli ambassador to the US from 2009 to late 2013 and if you check out his wikipedia article you can see some of the very valid reasons for those fears/accusations/solid evidence of bias.
However, in his defense he is some what upfront in admitting his bias and he does point out that b/c Syria, Egypt, Jordan, Iraq, et al are closed societies it is much harder to obtain sources from their governments.
And of the three or four books aimed at a general audience about the war I think it's been the most readable and had more access to some of the Egyptian sources than the others.