Basically, is the moon and star used in many flags today and historically, based on any natural alignments of the moon and one star?
The crescent moon is supposed to represent the phase of the moon on the night of the first revelation of the Qur'an in 610, and it was a common symbol used on early Islamic war flags. It's kind of an unofficial symbol, as Islam doesn't have a "real" symbol, in the sense that the cross has come to represent Christianity, for example.
The star was added during the Ottoman period (the crescent-and-star was first adopted under Mustafa III in the 18th century), but its provenance is unclear (i.e., why a star, and why with the number of points it has -- which has changed).