Black castle is water-proof. It is painted with black lacquer containing iron. Iron-contained black lacquer prevent the castle from being decayed due to rain and snow.
On the other hand, white castle is fire-proof. Himeji castle is covered with white plaster. It is made from shell ash, seaweed, hemp fiber and slaked lime. These materials protect the castle from fire.
Around the beginning of the 17thcentury, most feudal lords chose to build white castle because Samurais used guns in the battle. So, it is more crucial for them to build fire-proof castles than water-proof castles.
In addition, black castle looks smaller than the real one. White castle looks bigger than the real one. So, I think castle owners utilized the characteristics of these colors strategically when they built their castles.
In 1600, the battle of Sekigahara happened. It was fought by two powerful Samurai family, Tokugawas and Toyotomis. All the other Samurai were on the either side. Japan was completely divided into two groups. The Tokugawa family won the battle and the head of the family Ieyasu was appointed to be the Shogun after the battle.
This battle paved the way toward the end of Warring State period.
Before Sekigahara battle, many castle owners preferred black castles to white ones. After the battle, many white castles were built. White castle owners were on the Tokugawa side. So, they tried to show the power and authority of Tokugawa. That is why they used white which looks bigger.
Tokugawa Ieyasu, the founder of Edo shogunate, awarded the Himeji castle to Ikeda Terumasa for his help in the battle of Sekigahara. Terumasa is a husband of Ieyasu’s daughter.So, he is a son-in-law of Ieyasu. Terumasa completely rebuilt the castle from 1601 to 1609. It took 8 years to build this castle.