Loaning money to family and friends can often be a recipe for disaster. Even with an IOU or promissory note, sometimes the borrower will fail to repay the debt, and you will have to decide whether you should sue them for the money. If you do take them to court, your signed promissory note is proof that you made the loan, and that the borrower promised to repay it on the terms agreed to in the note.
But often the actual signing of a legal document makes the transaction more business-like, more like dealing with a bank. That in itself can act as a catalyst to ensure that the borrower makes the payments on time and honors the terms of the loan, especially when the borrower considers that you have a signed promise from him / her to repay the debt which will stand up as evidence in court.