If you are using a universal automatic transfer switch, its inbuilt system will automatically detect if utility power is back, disconnect generator, toggle circuit breakers, and so on. But for a manual transfer switch, you can realize through different methods if utility power is back on. The digital display on electricity meters turns on when power is back. Some street lights in your vision range will turn on upon restoration of power. You can get some LED installed before your circuit breaker. You can get an audible alarm installed for this purpose.