Why do ants come to my house in the summer?

Ants invade homes and other structures in search of food, water, and shelter. Therefore, effective ant management needs to be a combination of control methods that involve inspection, sanitation and exclusion, habitat modification.
It is important to check carefully and thoroughly both indoors and outside to determine areas of ant activity, nest locations, and type of ant present. Indoors, follow ant trails to locate their entry point such as an electrical outlet or gap along a baseboard or around a water pipe. Outside, check the foundation, walkways, trees and shrubs, and in mulched areas for ant trails. Look for nests in mulch and vegetation next to the foundation. Check under potted plants, patio blocks, and stepping stones, and in piles of rocks, lumber, and firewood. Inspect the foundation to find possible ant entryways such as areas where pipes enter the building, foundation cracks, and around doors and windows. If swarmers were found indoors, then you could very easily have an indoor infestation, e.g., in a wall void, in the crawlspace or in the ceiling. In those situations, a careful inspection of the crawlspace may also be needed.
Ants are attracted indoors to food and water sources. Make your home less attractive to ants by keeping it as clean as possible. Clean up any food spills and crumbs as quickly as possible. Rinse all food and drink containers thoroughly before placing them into trash or recycling bins. Remove food debris from your sink after washing dishes and cookware, and clean out strainers that collect food particles in sinks drains. Store food in air-tight containers or keep refrigerated. If possible, do not leave pet food out continuously. Frequently, ants enter homes in search of moisture. Check both interior and exterior water sources for leaks. “Ant-proof” your home by sealing up any gaps, cracks, or holes around windows, doors, and foundations.