An anonymous sperm donor who donates to an anonymous recipient through a registered sperm bank usually signs away all rights and is absolved of any future responsibilities. However, if the sperm donor and recipient are in a relationship, or even if they just know each other, what is agreed to beforehand can make a big difference. A lack of an agreement could spell trouble.
Consider the case of actor Jason Patric. Four years ago he donated sperm to an ex-girlfriend for an in vitro fertilization procedure (they had been unable to conceive during their relationship). After the baby boy was born he and his ex-girlfriend remained on friendly terms, and he contributed financially and spent time with the boy. But then the relationship soured. Now she wants sole custody. She claims that Mr. Patric never intended to be an equal parent, and that he only agreed to donate his sperm on the condition that he not be held responsible. She points out that his name does not appear on the child’s birth certificate. Mr. Patric is suing for shared custody of the boy in the state of California. He claims that he has been part of the boy’s life from the beginning and that he intended to be a parent to the child when he donated his sperm.
However this case turns out, it's a cautionary tale for anyone who is not married to the other biological parent of their biological child. Make sure you have a legally binding agreement describing your rights and responsibilities (if any). It wouldn’t hurt to know laws of the your state of residence as well.