Yes. On any computer, using any operating system (OS X, Windows, Linux, whatever), you can reinstall any app without loosing any of the saved documents.
Now that you feel safe, let me warn you that on any computer, using any operating system, something unexpected could happen at any given moment to damage your pictures. You MUST drop this habit of depending on luck and start keeping a backup. Look at the Dock at the bottom of the screen. See that Time Machine icon? Click it. Use it. Of course, to use it, you must buy an external HDD, cost US$50-200, depending on size, speed, an case design. Are these photos (and other things on the computer) worth that much to you?
With most computer issues, the first step is to test the file system on the HDD. Open Disk Utility. Select the "Macintosh HD". Select the "First Aid" tab. Click the "Verify Disk" button.
To troubleshoot any app, make a test user account, log out, log in to the test user. Then try iPhoto. If it fails in the test user, move the file "iPhoto.app" to the trash and reinstall iPhoto. If it works fine in the test user, log out, log in to the original account, and go to:
/Users /yourhomefolder /Library /Preferences
Move the file com.apple.iPhoto.plist to the desktop. Try iPhoto. If it still fails....
Quit iPhoto.
Go to:
/Users /yourhomefolder /Pictures
Move iPhoto Library to the desktop.