How do I keep the door jamb moulding from pulling away from the wall when hardware is screwed in?
Did you pre-drill the holes for the screws? 

It seems as though the screws have hit something solid (screw/nail head, etc). Which is causing the molding to be pushed away, instead of the screws penetrating deeper into the wall.

This might be a sign that the hardware is only held in place by the molding, which isn't going to be very secure. You'll want to make sure the screws are held securely in the studs, and not simply in the finish materials (drywall, molding, etc.).