Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Well, let me expand a little bit. The contacts of the 0402 are smaller and therefore the series inductance of the capacitor is a little smaller. Moreover, you can place the 0402 closer to the chip, improving the decoupling effect. The cons are that you can't really have big capacitance values.
Inductors (and resistors) are almost the same but can generally carry less current.