Guppy or molly with either platy or swordtail is impossible. It's like trying to breed a dog with a cat.
Now guppy with molly is possible but the offspring are fragile and, as far as I am aware, sterile. This is somewhat analogous to crossing a horse with a donkey and producing a mule.
Platy with swordtail happens all the time, on the other hand and the offspring are just as healthy as the parents. In keeping with the theme, this would be analogous to crossing a wolf with a coyote.
Looking at the genus two species belong to is a good guideline for predicting whether they will be able to hybridize or not. However, it isn't a sure guide. Both platies and swords are in the genus
Xiphophorus and both mollies and guppies are in the genus
Poceilia. But, clearly, the ease with which these fish hybridize and their genetic compatibility is not comparable.
Genera are assigned by people and only really indicate how closely related the species are. While it's true that more closely related species are also more likely to cross and produce viable offspring, the fact that the genus is such a subjective thing means the relationships can sometimes be incorrect or you may be dealing with a species that is 'only just' within the specified genus. The genus will also often change as the classification is revised.
For example, the banded gourami (
Colisa fasciata) has also been placed in the genus
Trichogaster.
Another example is the honey gourami which has been placed in the genus
Trichogaster as well in the past (last time I checked it was in
Colisa[/i though) and yet could hybridize (and obviously still can!) with a Colisa species - Colisa lalia.