Traditionally, Apollo has many functions, being the god of prophecy, music, medicine, archery, and the arts. Artemis is the perpetually virginal goddess of the hunt and the wilds, protector of children, and a master archer like her brother. Later, however, the twins came to be associated with the sun and the moon, respectively. Why was this the case, when the Greeks already had Helios and Selene to represent those heavenly bodies? Maybe they wanted to streamline their already packed pantheon. I don't know. I've seen some myths that were sometimes about Helios and sometimes Apollo, depending on the version. For instance, whose son is Phaeton, the careless boy who drove the solar chariot too close to the ground and ended up creating the Sahara Desert? Usually Helios, but I'm pretty sure I've seen both. In their celestial roles, Apollo was known as Phoebus, and Artemis less commonly as Phoebe.
Due to their similar functions, Artemis was sometimes also combined with Hecate, the most likely pre-Olympian goddess of witchcraft and the underworld. She's the one who appears twice in Macbeth to converse with the Wyrd Sisters, in scenes that don't really move the story forward.
Apollo and Artemis are children of Zeus, with their mother being the Titaness Leto. When Zeus's wife Hera found out that Leto was pregnant with her husband's children, who were due to change the natural order of things, she forbade the Titaness to give birth anywhere on the mainland or an island. She finally overcame this by giving birth on the floating land of Delos, which didn't technically count as an island. While wandering to try to find such a place, various monsters attacked her. These included the Python, whose story I addressed in this post. I've seen it suggested that the story of the pregnant woman and the dragon from Revelation 12 is essentially a Christianized version of the tale of Leto's pregnancy, which makes sense, considering the Greek influence on the New Testament.