The ability to bend strings on guitar is a huge expressive advantage over many other instruments. Bending gives your melody lines a very vocal quality and it's easy to learn.  There's a few issues that pop up on learning bends that we'll take care of here.

Bending a guitar string involves pushing the string toward the ceiling to stretch it tighter and change its pitch.  The top three strings get pushed toward the ceiling, the bottom three pulled towards the floor.  That's just so you don't run out of fretboard and slip of the edge.

Tip #1 - Use more than one finger.
Using more than one finger gives you more leverage and strength so you have control of the string.  Start with a bend at the 12th fret of the 2nd string.  Your starting note is a B.  Use your third finger on the note and place your first and second fingers on the same string behind it.  You don't have to squish them into the same fret.  Now pick the note and push the string toward the ceiling, making sure to keep perpendicular pressure into the fretboard so the string doesn't slip out from underneath.

Tip #2 - NOW you can flop your thumb over the top. 
I'm sure you know that good traditional left hand placement means having your thumb in the back of the neck and pointed roughly toward the ceiling.  Just like everything else in music, there are exceptions to the rule.  When you're bending strings, having your thumb up over the top of the neck will give you some extra leverage to control your bends better. 

You may find it difficult to just push the strings with your fingers alone.  A better way, and one that gives you more control is to rotate from your wrist and use that motion to push your fingers and the string.  Look for a close-up video of Slash taking a solo and watch his wrist motion.  He uses it very well.

Tip #3 - Know what pitch you're headed for.
This is the most important part of bends that will make you sound like a pro guitarist instead of an amateur.  You have to know what note you want to bend to.  Most bends will go up either a half or whole step, though others are possible, like step-and-a-half or quarter step bends.  Start with a half step bend.  Take that same starting note of a B on the 12th fret of your 2nd string.  Before bending, play the C at the 13th fret to get the note in your ear.  That's the note you need to match for your bend.  Now bend that 12th fret B until you hear it reach C.  For a whole step bend you first get your reference note at C# (14th fret) and then bend your 12th fret note until it matches. 

Of course when you're playing bends in a solo you won't go play the target note first.  But you want to do this as practice to train your ear to hear those interval changes and nail them without going sharp or flat.

Question: Do I have to be stuck in this fascist half step/whole step pitch jail?  Or can I bend larger and smaller intervals too?
Answer: I love a rebel... Yes, you can.  Larger leaps like a step-and-a-half or two steps are certainly possible depending on how strong your hands are.  Just be sure to know what you're trying to get creatively.  You can also go smaller with a quarter step bend, which is a really nice bluesy touch.  A quarter step is, for example, the note between B and C.  We don't have a name for that note, but it lends a nice little twist to the right notes.

Tip #4 - Try different types of bends.
Having said all that, there are no rules for string bending.  If it's a sound you like, then go for it.  Here's a couple ways to manipulate bends.
Measured Bend - Create a rhythm between the bent and unbent note, either just in a pair or repeated.
Instantaneous Bend - Grab the note and bend it right off the bat to create a scoop effect.
Bend and Release - Bend the note up to your target pitch then, without releasing the pressure on the string, unbend the string back to the original note.
Ghost Bend - This is a great one.  Bend the string before you pick it.  Then pick the string and release the bend so that you only hear the descending note of the bend.  It's a very cool, mournful, "crying" sound.

Once you've got a handle on the basics, start experimenting.  As I said, there are no rules.  One of my favorites is to do a ghost bend up a whole step, release it by a half step, and then re-bend up to the whole step again.  There are an unlimited number of ways to mold and shape notes this way.  Try it out and it will make your guitar leads sound much more interesting.