Vastu is science related to Land and the effect of the celestial body. According to mythology. A Mani from Lord Shiva's Eye drops and created a dragon called MOONGA. The dragon creates havoc among Devi Devatas .So Lord Shiva decides to destroy it. Moonga is pressed into the land in head facing North East direction. Moonga pleads Lord shiva to have mercy. So Shivji showing mercy on Moonga blesses it to become the Lord of land and names it Vaastu.

Vaastu is as old as Vedic. In the puranas it is mentioned that Ravana abducted Vishwakarma the celestial architect to build Lanka as per Vaastu. Shri Krishna engaged the services of Vishwakarma to build Dwarka. Pandavas at the command of Shri Krishna prayed to Vishwakarma to build Indra Prastha.

How it all began

Basically, the life force within the earth is called Vaastu, and all objects placed on it share this life force. Vaastu is explained as the living space (Vas meaning  "to  live") Vaastu believes that the following three elements can be closely controlled by applying it  scientifically. 

Epics like the, Vishnu Dharmottara Purana,, Viswakarma Vaastu, Aparajita,Samarangana Sutra Prutchcha,Bruhatsamhita Sastra, Dharana show that Vaastu is nothing but science.

Soil Testing: Test the soil before starting a construction in order to avoid problems.

Soil Test 1
Dig a pit of 1/1/1 foot ( 1 cubic foot ) at the center of the plot where the two diagonals of the rectangle meet, fill the same with water to its full at sun set and close it with stone slab. Remove the stone slab the next day at sunrise and observe. If there is no water left and it is observed that the pit is dried and cracked the plot is unworthy for construction of any building. If water is retained the plot is ideal for construction ( the more water retained the better).

Soil Test 2
As above dig pit a of one cubic foot and fill the same pit with the soil so removed. If some soil is left over it shows that the plot is very good for construction. if no soil is left over but the pit is full the plot is just moderate for construction. If the pit is still not full filled it shows that the plot is totally unworthy of any construction.