Wiktionary
n. 1 (context legal English): Where two subsidiaries of the same parent company accidentally sue each other, not realising that they have the same owner. An analogy is "friendly fire", where a person accidentally shoots someone on his or her own side. 2 (context legal English): Where a person sues another person (friend) purely to settle a point of (unsettled) law.
Wikipedia
In the United States, a friendly suit is most often used when two parties desire or require judicial recognition of a settlement agreement, and so one sues the other despite the lack of conflict between them.
The law condones this practice because there are several benefits to settling a lawsuit as opposed to settling a claim outside of a lawsuit. First, if one of the parties to the claim is a minor, they usually cannot settle the claim without the appointment of a guardian ad litem to review and accept the settlement. Once the suit is filed, and the settlement is reviewed by the ad litem who considers the best interest of the child, after which the parties can then file a joint motion for the court to render judgment, which would then be binding on all parties regardless of their minority.
When there is a judgment, the parties also gain the defense of res judicata if sued again on the same topic.
Friendly suits are generally prohibited in the Article III courts of the United States. As in United States v. Johnson, 319 U.S. 302 (1943). In practice, however, friendly suits are rarely explicitly described as such, and they could easily slip into the judicial system through some casual omissions.