All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
There are three possibilities that apply to your case:
The first possibility: your wife gave you the money with which she contributed in building the house as a gift and donation out of her own will. In this case, the land and the house are your property and your wife has no right in them.
The second possibility: your wife gave you the money as a partner; in this case, she is entitled to her share according to her contribution in the building of the house, but not in the land. Her share will be according to the percentage by which she contributed in it. So if she contributed half of the construction costs, then she is entitled to half of the house after estimating its price, and so forth.
The third possibility: she gave you the money as a loan; in this case, she is entitled to the same amount that she had given to you, and the land and house belong to you.
If by the word ‘will’, you mean documenting the matter in order to preserve rights, then this is a good thing, and there is no specific wording for this; any clear statement that expresses your right and hers in light of what we mentioned above is sufficient, without ambiguity or obscurity.
But if by ‘will’ you mean a donation that will be effective after your death, then there are some Islamic conditions for it. Firstly, it should not be for more than one third of your wealth, as the Prophet said to Sa’d ibn Abi Waqqas when he [the latter] wanted to donate in charity all of his wealth, “Give only a third, and a third is a lot. It is better to leave your heirs rich rather than leaving them dependent on other people." [Al-Bukhari and Muslim] Secondly, the will should not be for an heir, as Abu Umaamah Al-Baahili said, “I heard the Messenger of Allaah say, 'Verily, Allaah has given every person entitled to a right his right, so there is no bequest (will) for an heir.'" This was reported by Ahmad, Abu Daawood, Ibn Maajah, and An-Nasaa’i.
Allaah knows best.