The option for iTunes automatically opening when an iPod is connected can be enabled/disabled in iTunes in the Summary tab for the device when its connected. You can toggle whether it autolaunches iTunes when connected. iPhoto is launching because its thinking the iPod is a digital camera. You probably took a screenshot or downloaded something from a website you were viewing in Safari. You can either just delete the downloaded files off the iPod touch or open up the Image Capture application and in its application preferences, under the Image Capture menu in the upper left corner of the screen to tell it to not launch iPhoto when connecting a digital camera.