Mollies and guppies are very similar fish with comparable behavior and needs. Generally speaking, they can get along in the same tank, but your success at keeping them together may depend on the specific breeds and individuals involved, and on your tank set up.
Mollies and guppies share the genus Poecilia. They each are one species with many breeds. Both are prolific livebearers with easily distinguishable sexes. Both are considered easy to care for and are fairly peaceful, and they enjoy similar habitats and foods.
Those similar habitats and foods are where problems can develop. When two species exploit the same ecological niche, even if that niche is inside your fish tank, competition and aggression can grow between them. Count on keeping a larger aquarium and monitoring feedings more carefully than if you kept one species alone. Also, many guppies are bred to have long, flowing fins. Some fish can't help but nip at these, and since guppies are considerably smaller than mollies, they can definitely end up the worse for wear.
"Brackish Water Livebearer Seeks..."
Mollies and guppies share similar interests. These include eating small, wiggling things, breeding, nibbling on plants, and darting in and out of cubbies. They like to feed from the surface or in open water, prefer live food plus plants, and enjoy a heavily planted tank with moderate water movement. Each species is extremely social with its own kind and very active. Both are likely to notice your approach, especially around feeding time. Mollies and guppies enjoy brackish (very slightly salty) water, though each can live and breed in freshwater. If you want to try keeping them in more natural conditions, consult a fish manual or experienced keeper about how to mix brackish water for a planted, livebearer aquarium.
If there is one thing livebearers do best, it's breed. All you need is a male and a female and you're virtually guaranteed a pack of baby fish, and sometimes you don't even need that. Female mollies and guppies store sperm from a single encounter for multiple pregnancies: Mollies for about 3 months (2 or 3 pregnancies) and guppies for the rest of their lives. This means that many are pregnant before they leave the pet store and will bear several times, even if they never see another male. Keeping only one sex of each species might seem like a good method of fish birth control, but shockingly enough, this is not the case. While mollies and guppies are different species, they share the same genus (like lions and tigers). This means that, while they prefer members of their own species, it is possible for them to produce offspring with one another (like ligers and tigons), especially if you limit their dating pool.