Exactly how early I cannot say, but Aristotle's model of the universe (~300 BC) is consistent with a spherical earth with half bathed in sunlight at any given time.
Aristotle's theory was that the sun (and other heavenly bodies) were stuck in concentric spheres around earth and that these spheres rotated around a stationary earth. This not only explained night and day, but could also explain lunar eclipses as Earth's shadow on the moon. So even if Aristotle's theory wasn't completely correct, it would correctly predict day and night patterns on Earth.
Edit: sources (I tried)
also, when did we discover that the seasons are opposite on the other side of the equator?
People knew the earth was round very early from a variety of observations. The idea that people believed the earth was flat is a myth from the nineteenth century, of all things. If we discuss some of the evidence then I think it's obvious that people would have known half the earth was lit and half dark.
Ancients observed the shadow the earth cast on the moon during eclipses, which clearly showed the earth was round. The shadow also transited across the moon, showing relative motion of the sun, earth, and moon. The sun clearly moved across the earth every 24 hours, so it is a logical geometric inference that the sun travels around the earth (since we can't feel ourselves moving). They also noticed that shadows of tall objects were different at different latitudes. And shadows of course change as the sun moves in a way that supports circular relative motion of the sun and earth. Similarly a ship crossing the horizon will disappear hull first and mast last, clearly showing objects traveling across a very large sphere.
Certainly no later than ancient Greeks where the geometry and astronomical observations were available did people realize that the earth was a sphere with circular (more or less) relative motion with the sun. Aristotle wrote this down in his model of the universe but he was not the first to develop this model--he was concerned with necessary mechanisms for this model to make physical sense (for his understanding of physical sense). It may have been known to Egyptians and Babylonians but they had less of an inclination towards deep, scientific explanations and were more devoted to pure observations (which the Greeks used later). So I'm not sure if it was known earlier.
Since antiquity there have been people who knew that Earth is a sphere and could probably infer that while one side was in daylight the other was in darkness. For example Eratosthenes used the length of shadows in Alexandria and Aswan to estimate the circumference of the Earth, by assuming that Earth was a sphere and that the sun's light traveled in parallel rays. He also gave fairly accurate calculations of Earth's distance from the sun and axial tilt. Since antiquity it's been known among the educated that the Earth is spherical, and in either a geocentric or heliocentric model of the solar system it still follows that one side of the sphere would be in darkness while the other was lit. So I would say that people have "known" (i.e. been able to infer) this since ancient times.
However, if by "discovered" you mean when were people directly able to confirm that the sun was at a different position at a different longitude, and measure this difference directly rather than just inferring it, then it would be much more recently, with the rise of the British maritime empire. Sailors would set their timepieces to the time at the Royal Observatory in Greenwich, then use the difference between Greenwich time and the actual solar time they observed to calculate their longitude. This, as far as I can tell, is the first time it was directly observed that the sun would be at a different position over a different longitude at the same time.
One of the major drivers for medieval Muslim investigations in spherical trigonometry and other subjects was determining the direction of Mecca. One of the simpler methods is observing the direction of shadow at the time when the sun is directly overhead in Mecca. This requires explicit knowledge of the time difference between one's location and Mecca. Fakhruddin Razi (d. 1209) documents this method in detail in his Tafsir (Arabic). I'm certain that others (Khwarazimi, Beruni, Battani?) documented this earlier, and probably had other relevant observations on time difference. It also seems unlikely that Eratosthenes or Ptolemy could have not been aware of this - the former's very method for calculating the size of the Earth would seem to make it impossible not to understand. But Razi is the earliest definite document I can cite.
If anyone gets around to a proper answer, I'm curious if some light could be shed on how wide spread the knowledge of the discovery was in the time period of the discoverer, and the approximate area the discoverer lived in.
Does the concept of night & day (or, more to the point, the planet having 'another side') require a spherical earth? Were there concepts like the Earth just being a slab or some other shape?