What is the best way to define an I/O pin?
#define ledPin 9 is preferred. By doing int ledPin = 9; you will be allocating an int memory whose value is used every time you use ledPin. #define is different in the sense it doesn't allocate memory. there is no memory called ledPin. Before compiling all "ledPin"s in the code(other than strings) are replaced by 9. So basically 

digitalWrite(ledPin);


becomes

digitalWrite(9);


Advantages of #define : Saves memory and since all ledPin are replaced by 9 before execution, it saves processor time. 
Doesn't really matter in small codes...