The mechanism to realize the peculiar flat bands generally existing in RCo5 (R = rare earth) compounds is clarified by analyzing the first-principles band structures and the tight-binding model. These flat bands are constructed from the localized eigenstates, the existence of which is guaranteed by the destructive interference of the intersite hopping among the Co-3d states at the Kagomé sites and those between the Kagomé and honeycomb sites. Their relative positions to other bands can be controlled by varying the lattice parameters keeping their dispersion almost flat, which suggests the possibility of flat-band engineering.