When a string breaks, the change in tension will not damage the guitar, but it will cause all the other strings to go slightly out of tune, so if you continue playing you may want to check the tuning. The more flexible the instrument is, and the thicker the strings, the more it will be detuned by the loss of a string. For example, an electric guitar with thin neck and heavy strings (more flexible and under more tension) will change much more than a classical guitar with nylon strings (more rigid and under less tension).
For the same reason, if you tune the strings from top to bottom, if there were some big changes after you finish you may need to go again from top to bottom once or twice again, because changing the tension of the last strings you tune will affect the tuning of the strings you tuned before.