The Sunshine Balls are large orbs that are able to replicate the sun's rays artificially by giving out a bright light. As noted by Decoe and Bocoe, the Sunshine Balls appear to have some sort of hypnotizing powers as the citizens were rooting happily for Eggman. They needed special towers called "Mirror Towers" in order to keep them functional.
When the moon was broken in half, Dr. Eggman fixed it by making a robotic contraption, which would slowly move the moon into an orbit in which it blocked the sun's rays. This caused haywire towards most of the citizens of Station Square, claiming that they can never have sunlight. Eggman, in response, developed the Sunshine Balls to provide the people with the much needed light. The demand for these objects quickly rose within the public until Sonic, who didn't trust Eggman, proceeded to destroy Mirror Towers which are required to maintain the Sunshine Balls' power.