Fanucci wore white, probably as vanity, and to show the people he was shaking down that he was a "grandee," someone whose physical appearance would show them he was bigger and better than they were--and not to be messed with.
In addition to establishing an alibi as SB said, Vito's charade may have been both a test, a precaution and a lesson in dealing with his new friends, Clemenza and Tessio. A test, because he wanted to see if they'd trust him with the negotiations and give him their share of the money to be paid to Fanucci. A precaution, because he didn't want the possibility that his new pals might rat him out--"Yeah, Vito said he'd kill Fanucci rather than pay him off." A lesson, because until then he'd been silent and passive, seemingly accepting Clemenza's leadership (and in a deleted scene, grunt work). But Fanucci's sudden death surprised his pals, made them wary of him for a while (per the novel) and finally cemented Vito's leadership.


Ntra la porta tua lu sangu � sparsu,
E nun me mporta si ce muoru accisu...
E s'iddu muoru e vaju mparadisu
Si nun ce truovo a ttia, mancu ce trasu.