I think lightboxes are useful wherever a modal dialog pattern would be appropriate in the UI.
For example, showing a login lightbox with an AJAX action to allow a user to login is much less intrusive than redirecting them to an entirely new page then redirecting them back to where they were, so I think it's appropriate there, provided that logging in is optional to begin with. If you force users to login before they can use the site however, then this pattern is not useful.
However, using a lightbox to display thank you messages is intrusive - so I wouldn't do it there. Having a clearly marked status indicator or message within the page layout is better, as it can be related more clearly to the main UI and doesn't annoy the user.
I generally use lightboxes to provide out-of-page functionality where the required UI would not fit well into the main page - for example, on a page where multiple documents need to be uploaded, I would provide an upload button next to each document item, which when clicked would display a lightbox that collects the details of the document (type, file, date, etc) then posts the file to the server using AJAX.
This keeps the main page streamlined, the dialog can be defined once and reused multiple times, and it's quite simple to use, I think, as it essentially behaves like a desktop application.