The writers and directors behind the various MCU films have often collaborated to ensure consistency across the different films, but the case of Wakanda in Black Panther and Avengers: Infinity War is especially important.
In order to craft a cohesive version of Wakanda, the teams behind Black Panther and Avengers: Infinity War worked side by side.
That is to say: Black Panther will be telling its own self-contained story, but keeping an eye on Avengers: Infinity War along the way.
Aside from what are sure to be huge openings for both films, Black Panther and Avengers: Infinity War will also share some characters and locations in common.