so at some time we never had male and female of a species, so what would have caused the two to occur?? either separately or together ..
Have you actually read anything that has been said about this? I don't known why your talking about "a species" as if it has to happen for each one. Most species with male and female would have evolved from species that already had the distinction.
As I said before, sexual reproduction came first in very simple, single-celled organisms (probably before the
LECA - the ancestor of all plants, animals, and fungi - see previous link) - specialisation into male and female can develop later and doesn't need to happen all at once. There are hermaphrodites, organisms that use both sexual and asexual reproduction (see Steve's post), those that can change sex during their lifetime, and so on.
It really doesn't take much imagination to see any number of possible scenarios - and the changes need not be all that significant for simpler organisms.