When beginning construction of a new building it has become customary to hold a ceremony called Hanachat Even Hapinah (laying the cornerstone or foundation stone). In doing so we are emulating Hashem, Who founded the world on the even shetiyah, the stone upon which the world was founded.
This custom is based on verses in Tanach, and also found in the Zohar, where it says that when one begins construction they should verbalize that the purpose of the building is to serve Hashem. They should resolve that they will make it a place of Torah study, prayer, and doing mitzvot. It is also an opportune time to say words of Torah and thank Hashem for enabling them to build this new structure.
There are those who developed a "custom" of writing a scroll of parchment and inserting it into the ground either above or below the foundation stone. This custom does not have a source in Torah and should not be practiced. This custom falls under the category of, "all who add, ultimately detract"; these "additions" detract from our authentic traditional Torah customs. In our generation in particular we have to be especially cautious about introducing new customs that have no authentic Torah source.
Rav Yosef Yeshaya Braun, shlita, member of the Badatz of Crown Heights; One Minute Halacha, #396, crownheightsconnect.com