Anyone can write a loan agreement, but it is wise to have a lawyer do it to ensure it meets legal requirements and adequately protects both parties' interests.