How can I tell if an unsolicited offer to publish a book with Springer is legit? Our team had a paper recently published in Energy and Buildings, and one of us (not the main author) received last week an email from someone claiming to be an editor with Springer.

According to this email, the editor was "impressed" with our paper and invites us to write or edit a book.

I have a nagging feeling that this is one of thousands of similar random emails sent to the authors of published papers. How can I know if this is a legitimate email, and whether it would be worth the effort? The email address comes from a springer.com domain, so it's probably not a random spammer.
Book editors sometimes send unsolicited e-mails to people who write well on topics that can attract an audience, so this could well be legitimate.  There are a lot of scams, but generally from publishers you've never heard of.  On the other hand, there's no reason to think these signs of initial interest will necessarily lead to an actual contract.  If it interests you, it can't hurt to look into it.  If it doesn't interest you, you can safely send a very brief reply or even ignore the e-mail.

Whether it's a legitimate e-mail shouldn't be too hard to figure out.  If there's a return address from springer.com and someone claiming to be this editor responds to e-mail sent there, then it's probably legitimate (although in principle it could be a rogue employee or a hacker inside Springer's network or yours).  If the e-mail asks you to get in touch in some unconventional way, such as a private e-mail address, then it's probably not legitimate.

Whether it's worth the effort depends on the circumstances.  Springer publishes some truly excellent and important books, as well as others that are mediocre at best.  Whether publishing with them is a good idea depends on your career plans and book ideas, as well as what you think of the contract they offer and their publishing practices.  You should take a look at what else they have published recently in your area, as well as what has been published in series handled by this editor.