If you're asking about the opening hours of the Sonic the Hedgehog franchise's themed locations or a specific Sonic Drive-In, the answer varies by location. Many Sonic Drive-In restaurants stay open long hours, often until late evening, with some operating around the clock.
To get the exact hours, it's best to check the specific location's listing online, since times differ from one place to another. Some even offer special happy hour deals in the afternoon.