You can first tell when the babies (fry) are about two-three months.
Apart from the anal fin, female Molly's are generally rounder and males more thin/long. You can really see that difference in mine. Another way to tell is colour. Say if you had two orange Molly's: One male- one female. The male would be brighter coloured by a bit.