For most sliding doors, adjusting the latch involves aligning the door in the frame, adjusting the latch bar in the jamb and checking the latch mechanism for lubrication and loose screws. Pella doors have an adjustment screw, located on the edge of the door above the latch, that is engaged when the latch is in the locked position.
Most sliding doors have a latch mechanism that hooks onto a bar that's set in the door jamb. The door latch hooks over this bar and locks in place when everything is aligned correctly. This mechanism goes out of alignment when screws are loose, the door is damaged or not properly aligned in the track, or the latch was not installed correctly.
First, check that all the screws are tightened and the door is set in the door opening. Make sure the door rollers are working properly. Make sure the door latch is seated firmly on the door. Turn the latch, and make sure the hook opens and closes fully. If the latch sticks, spray on a little lubricant. Check that the hook provides enough clearance for the bar when it is closed. If not, loosen the screws on the latch and adjust it sideways.
Close the door, leaving a small opening, and then turn the latch, observing the hook. If the hook is out of alignment with the bar, reposition the bar in the jamb. If the bar is in alignment with the hook but you can't close the latch, reposition the bar closer or further from the door. If the old screw holes are in the way of properly adjusting the bar, fill the holes with two-part epoxy and drill new pilot holes.