This very brief tutorial will show you how to stop iPhoto (or any App) from automatically opening when you plug your phone into your Mac.
From the DEVICES list, select the entry that represents your phone.
click to enlarge