I don't really know how to explain this, it's kind of something that you just know, but I'll explain with example. You want the amount of charge on a molecule to be minimized. So if the option is having 2 negative and 2 positive charges on a structure vs 1- charge an one positive charge you pick the one with the smaller separation of charge (the latter). Also you want to spread out charge as much as possible, you don't want two negatives right next to each other if you can have the two negative charges at the opposite sides of a molecule. Also pay attention to the which atom has a higher electronegativity, if it does it will be more likely to hold a negative charge. if you have the option of putting a negative charge on an oxygen or a sulfur you would put it on the oxygen and that would be the more valid resonance structure. If you have 2 resonance structures and one can be made by having two negatively charged oxygens connected to say a neutral nitrogen, your other option would be to have one of these oxygens double bonded to nitrogen. and nitrogen will be positive and only one oxygen will be negative.