Why was the Constitution Written?

It was written to create the type of government that the colonists had been fighting for and to define the goverments role in the rights of its people.