What are the primary factors that determine the choice between DC and AC for a specific application?

How do DC and AC systems handle power distribution in residential areas?
Are there specific applications where DC is preferred over AC in the field of electronics?