At first the Greeks imagined that the sun was the god Helios, or Apollo, driving his chariot around and around the earth. In the morning he began driving up in the sky, and then in the evening he drove back down again, and that was the sunset. At night the horses rested under the earth. (Compare to the Egyptian sun god Ra.)
By the Archaic period, though, in the 600s BC, Greek scientists like Thales of Miletus (a Greek city in West Asia) were beginning to understand that the sun was not a god but a round ball of fire hanging in space. Thales was able to predict when a solar eclipse would happen. Still Greek scientists thought that the sun went around the earth instead of the way it really is, that the earth goes around the sun.
In the Hellenistic period, scientists like Eratosthenes, Anaxagoras, and Aristarchus began really taking observations and making measurements. Anaxagoras, working in Athens about 450 BC, figured out that it was the moon getting between the sun and the earth that caused solar eclipses.
About 250 BC, Aristarchus of Samos (working in Egypt) did figure out that the earth went around the sun, though not everybody agreed with him. Then Eratosthenes, also in Egypt about 200 BC, figured out how far away the sun was from the earth (about 93 million miles).
The Librarian Who Measured the Earth, by Kathryn Lasky (1994). An account of the life and work of Eratosthenes, who figured out the circumference of the earth. Explains how he did it. Easy reading.
Greek Astronomy, by Thomas Heath (1932). A collection of what ancient Greek writers had to say about astronomy, in their own words, with a long introduction. For adults.
The History & Practice of Ancient Astronomy, by James Evans (1998). Includes both the history, and directions to actually re-do the experiments that ancient Greek astronomers used to figure out their conclusions. For adults.