Yes, you can definitely settle your case before going to trial. According to the U.S court system, 99% of cases get resolved through settlements before going to trial.
Now, as soon as one of the parties receives what we call the demand letter, attorneys then can sit down and start negotiating the terms of the settlement. If the case is complex or negotiations are not going so well, a third party can always intervene, in the form of mediation or CMC (case management conference) in order to facilitate reaching an agreement. Finally, once parties reach a consensus/agreement, a formal written settlement should be drafted.