Why a written constitution?

Do you mean, "Why did they create the Constitution?" or, "Why was the Constitution written down?"
For "Why did they create the Constitution?", because the Founding Fathers realized that the Articles of Confederation were not stable enough. The United States needed a stronger federal government.
For "Why was the Constitution written down?", so that if any changes were necessary, it would be easy, and also so that we wouldn't have to memorize the Constitution. If it had been strictly memory, the Constitution would have died with Jefferson and all those at the Constitutional Convention.