Many guitarists believe strings should be changed regularly, not just when they break. When strings do break, all the strings should be changed, not just the broken one, especially if the new strings are a different brand and most definitely a different gauge.
A word of caution: guitars are usually set up for one gauge of string. Switching gauges may mean setting it up again.
Gauges and brands of strings
The two most common gauges for the high E string in electric guitar are .009 inches and .010 inches (these measurements appear to be used often even in countries using the metric system). Often a whole set of strings is referred to by the gauge of the high E string, e.g., "nines" or "tens" for .009 and .010 gauges respectively. The beginning guitarist is recommended to start with .009s; many professionals also use this gauge, so many guitarists never "outgrow" it.
Three of the best and most popular brands of guitar strings for both acoustic and electric guitar are currently Ernie Ball, D'Addario, and Elixir. Ernie Balls and D'Addarios are much cheaper than Elixirs, but Elixirs will keep their bright tone for months (which is why they are higher-priced). But Elixirs can break as easily as any other strings, so they are perhaps best left to people who have been playing a long time and rarely snap strings. The difference between the other two brands is a matter of taste; try them both.
Stringing the guitar
There is no one correct way to string the guitar, but many incorrect ways, which range from using the wrong kind of string to inserting strings into the wrong tuners. The procedure also varies depending on the kind of guitar. (Courtesy of Wikibooks)
Experts say that if you play your guitar a lot, you should change your strings every three or four weeks. It is definitely time to consider changing your strings when (1) a string breaks, (2) the strings become hard to tune, or (3) the string tone becomes muffled.
I restring my guitars with Martin strings like those shown above. A great place to find inexpensive guitar strings on the web is Musicians Friend.