Each pair are semantically equivalent.
The main differences are of emphasis and continuation and leading from one topic to another.
In general, you would want to put which of the two you want to emphasise earlier in your sentence. Note however that toward the end of a paragraph, speech, section of a speech, etc. you can in fact emphasise something more by putting it toward the end of the sentence, and hence toward the end that section as a whole; people pay less attention in the middle.
Continuation is a matter of what you were already saying and/or what you were about to say. Consider for example:
It is a sad fact that some Irish children who were forbidden the use of their own language grew to become missionary teachers who would enforce similar rules on other peoples. [X]. The community can though be the source of resistance to such trends.
The community lacks representation in the forums where the decisions that affect them are made. [X]. Access to education can though benefit the community in other ways.
Now, consider one of your first two sentences being used where I have [X] above. Both have the same bare meaning, and with semantics as the sole consideration, either serves equally well.
The first of my passages though starts with talk of children and language and ends with talk of communities while the second starts with talk of communities and ends with talk of children's education. Therefore your first sentence is a more effective fit in the second passage, and your second works better in the first.
And obvious question now, is what if you have no particular desire to emphasise one or the other, or no obvious order from the rest of what you are saying or writing?
Well, your four example sentences are in fact showing four, rather than two, different structures, so lets examine each. The simplest first:
The electromagnetic force accelerates the electron.
This is a simple enough active clause for the form; the subject is the agent ("the electromagnetic force") which does something ("accelerates") optionally to an object which is the patient ("the electron"). It's pretty much as basic and common and "normal" as an English sentence can be.
(Agent, also called the actor, means the thing that does, patient means the thing that is done to. These are useful terms when we're talking about these sorts of differences).
The electron is accelerated by the electromagnetic force.
Is a passive clause; the subject is the patient ("the electron") which has something done to it ("accelerated") optionally by an object which is the agent ("the electromagnetic force").
We've already seen some reason for using one of these over the other in terms of emphasis and continuation with other text above. (And also, that both forms can emphasise either the agent or the patient depending on context). Other reasons include when we don't know what the agent is, or don't care, or the reader has already heard lots about it, as we can use those forms which omit the object ("The electron is accelerated").* The active is often the more euphonious, though sometimes the passive is particularly if it allows us to put simpler phrases ahead of more complex phrases (trust your own ear in this, but train it by listening to and reading those who use language well) so that is a reason to use it in itself, and the active is the more common and therefore to be favoured when either serves equally well.
Your first sentence:
The entire community is weakened when its children are forbidden from speaking their native language in school.
Joins an active and a passive clause (much the same would apply if done with two active or two passive) with the conjunction when to show that the first is caused by the second.
When children are forbidden from speaking their native language in school, their entire community is weakened.
Joins an active and a passive clause with a when and a comma to form a conditional sentence to show that the second is caused by the first.
Both of these are more explicit about the actual matter of causality than the other two sentences (while those about electrons entail a causality, these explicitly state it) and as such are to be favoured when that causality is of particular concern.
The former opens with the result and as such has a greater emphasis on that result outside of the matters of context I discussed above. The second opens with the when and as such lets us know immediately that we are going to have a conditional statement.
Neither work with either the cause or the effect omitted (in contrast to "The electron is accelerated." omitting the cause), because while both clauses about lingual rights and the plight of the community could be validly stated on their own, it is the combination that tells us what the stakes are.
The conditional comes into its own when we have more than one cause or more than one effect. One strong rhetorical technique is to pile several when clauses together to highlight just how good or how bad you are claiming something to be, before arriving at the good or bad consequence you claim is the result.
*There's a rather poor argument against the passive that claims that the ability to omit the object leads to evasiveness and mealy-mouthed thinking. Really this is nonsense as one can be just as forceful in the passive ("Yesterday, December 7, 1941—a date which will live in infamy—the United States of America was suddenly and deliberately attacked by naval and air forces of the Empire of Japan." is passive, but hardly vague or weak) and just as mealy-mouthed in the active ("They are in our thoughts" is active and while a nice sentiment from most can be politician-speak for "I have to acknowledge this is a problem or I'll look like a bastard, but I don't intend to actually do anything about it"). Orwell had good instincts that political writing tended to be mealy-mouthed, but failed in trying to put his finger on how that is reflected in syntax. Strunk and White had good instincts too (White for writing and Strunk for getting someone who was actually a good writer to revise his writing guide) but it remains that their attack on the passive has both technical errors as to what the passive is along with several uses of the passive in their, all-to-effective, attempt to convince people that effective language must spurn it. I rather suspect that what people really fear is just the label passive with its other meanings suggesting a lack of virility that does seem to make some people terribly anxious.