Interesting - the verb "separate" in Swedish is "skilja". Science is (according to wiktionary) from "scire" - "to know". Is that from "separate the wheat from the chaff", or how is knowledge tied to separation?
I don't have my full array of dictionaries at hand, but the Oxford Latin dictionary (the only one worth considering in my opinion if you want a serious discussion) gives the etymology of scio (the root verb) as possibly related to Sanskrit chyati and Greek schizo (as in schizo-phrenia, actually), both meaning to separate. I can't say for the Germanic connection to shit and friends, but it's not impossible, although I'm not sure where the l comes from.
I'm not entirely sure which root the Sanskrit form should be but it might be chid-, which fits with the Greek. In that case, I'd wager an Indo-European root along the lines of skedH-, with palatal k and laryngeal (IIRC, it's the laryngeal that gives the Greek z).
As for the derivation of the meaning, I think the notion of "separating right from wrong" is reasonable, but these things are often notoriously hard to pin down.
I imagine it as originating in knowledge about plants and animals. To know is to be able to separate one species from another, or one individual from the group. In the Genesis myth, the first thing Adam does is give names to different animals. And the Tree of Knowledge revealed the separation of nakedness from non-nakedness. This was before people "knew" things like history or math. I suppose this kind of knowing is similar to how the function `filter` separates things based on a predicate.
I would say that knowledge is tied to separation due to the fact that in order for you to know a concept, you will need to know what separates it from everything else.
Said in different words: Being able to see only one color is the same as not being able to see. You need at least two colors to see anything, as you need the contrast(separation) to see where something begins and/or ends.
I'm not sure about "science," but: According to the OED, the noun form of "skill" and the obsolete English verb "skill" (to separate, from Old Norse skilja) are both related to earlier Germanic words for distinction/difference.
However, in Middle English, the meaning of skill varied a great deal, sometimes representing, for example: "a statement made by way of argument or reasoning."