On the megas, they're defaulted to inputs so they wouldn't need declaring.
Any pin set as an input is considered to be in a high impedance state, and as a result of this is very sensitive which makes them great for low powered and weak sensors. think photodiodes.
A pullup resistor, is connected from the input to 5V, a pulldown resistor is connected from the pin to Negative. This forces the input to be in a HIGH or LOW state, which will help avoid random changes to the state due to electromagnetic fields and other intereference. (Remember, its sensitive!. The resistors simply make the switch stronger in both states giving more predictable results)