In my experience, and I'm not saying it's limited to these things, string breakage is almost always one of two things.
1 - Incorrect, inferior, damaged, or improperly setup parts. (bridge, nut, tuners, anything that can touch the string) This is almost always what it is, and you should always check this first, but it can also be...
2 - Wrong/bad strings. Be it, brand, material, or size for your playing style, or body chemistry. This happens, I can't use Ernie Ball, or Dunlop strings at all. They rust in less than a day. Plus the the coating on most coated strings turns to goo from the acids in my skin.
With parts, it all depends on where it breaks. If it obviously broke at the bridge, start checking for burs, or improper seating, or anything obviously not right. I've replace many bridges because I was loosing strings all the time. I replace it, and BOOM, no more broken strings.
Now, if you are rusting out your strings, like I used to do, you may just need to look for another brand, or material. I stick with nickel plated, but even some brands of nickel plated strings will rust on me too. These days, I pretty much only use DRs, and DAddarios to stay on the safe side, but I prefer the DR tone, and feel.