Open the bifold door that needs adjusting. Push the spring pin down, out of the upper track and pull the door out toward you. Lift the door up and remove the pivot pin from the floor bracket. Then lower it to remove the upper pin from the upper bracket. Set the bifold door aside.
Insert a Phillips screwdriver into the screw that holds the upper bracket in the top track. Loosen the screw and slide the bracket to either the left or the right. The direction you move the bracket depends on what the gap between the door and the frame looked like. If the gap was smaller at the top than the bottom, move the bracket to the left. If the gap was larger at the top than the bottom, move the bracket to the right.
Tighten the screw to hold the bracket in place. Fit the bifold door's upper pin into the upper bracket and pivot pin into the lower bracket. Push the spring pin down and release it into the upper track. Close the bifold door.
Repeat Steps 1 through 3 to make any remaining adjustments on the bifold door and to adjust the second bifold door, if necessary.