To add a lightbox capability to your WordPress Gallery and the ability to link thumbnails directly to external sites use the plugin RPS Image Gallery.
To use the plugin
- Go to Plugins > Add New and search for RPS Image Gallery.
- Click on Install Now and Activate.
- Preview your WP gallery. It should now function as a lightbox gallery.
- When you add or edit a gallery you would notice additional functionality on the right that let you add a link to the thumbnail.