I've had lots of emails and phone calls in the last year asking me how to secure a book deal and so as promised I'm going to share my experience (such that it is... I'm only on my first book and still learning).
First of all, not all ideas are equal. A subject that you find important and fascinating may not catch the imagination of many readers, so before you start developing your thoughts too much, it helps to do a quick calculation of how many people would be likely to buy it. The marketing bumpf in a book proposal is almost as important as the idea itself. So for example, if you would like to write a history book about the Spanish Civil War, then find out what other books have been published on the topic, how well they did, who bought them, and whether there might be any special reason for people to buy that book now (like an anniversary).
Now that's not to say that something obscure wouldn't sell: The Cloudspotter’s Guide doesn't sound like it would be an immediate hit, but it has turned into a runaway global bestseller. And this brings me to my next point: how are you going to tell the story? Seemingly dull subjects can be transformed by a wonderful treatment. Sometimes the skill lies in the writing, but sometimes it's also about your approach. Why not tell it from a different point of view? Find an interesting device, character or narrative? Rebecca Skloot's The Immortal Life of Henrietta Lacks, for example, is a book about biology told through the story of an amazing woman and her family. It's more fun than reading a boring explainer about genes.
Lastly, follow the rules. Publishers are quite explicit about how they would like to receive book proposals so if you just do exactly what they say, your odds of getting a deal go up immediately. Usually, you will need a well-written proposal that includes an introduction, chapter outlines, your biography (why should you write this book and not someone else), marketing information and a draft chapter or two. Don't skimp. If you mess up the proposal once then you damage your chances of someone looking at it again.
These days most submissions also have to go through a literary agent. So send your proposal to those you feel would best represent your work. The one I plumped for, for example, is Peter Tallack because his agency focuses particularly on science writers. Also, don't just settle for the first publisher who offers you a deal. Figure out which one is most enthusiastic about your work. I accepted a deal with Hodder not just for the money, but because they loved my idea from day one and have shown nothing but passion for it.
Simples! Hope that's useful! If you have any extra questions than leave a comment and I'll reply as soon as I can.