If you have the time, inexpensive dried beans are the best, as some  nutrition is lost in the canning process.
 Canned beans
Canned beans  are still very good for you though, so don't feel badly about using  them. I frequently use canned beans, rinsing them to remove the salt and   anything else that was added during processing. Just place them in a colander and run cool water over them until the water running out is clear. If you can, get organic canned beans to reduce the stuff you have to wash off.
The current concern about canned beans is that the linings used in the cans contain BPA (just like the plastic water bottles) and that the amount is particularly high in canned beans (it's also in canned tomatoes and other things as well). Everything I have read so far indicates that you can remove or reduce this through thorough rinsing. 
BPA free Cans:
Eden Foods are the only canned beans that I know is BPA free.
Soon to be BPA free:
Muir Glenn and Amy's are making changes to remove BPA per several web sites, but are not yet BPA free.
Not BPA free:
all others 
I'll edit this list when I learn of brands that no longer use BPA in the lining of cans.
Dried Beans
One of the best things I ever found out about beans is that you can cook them using any method you prefer, drain them, and freeze them! The first time I did this I also discovered that you don't want to over cook them as they will get a little mushy on the re-cook. So cook them to about 80% or so done, just close enough that a 1/2 hour or so in a pot will finish them. 
Clean your beans! 
Beans are harvested and processed by machine and are prone to   containing small stones, so protect your teeth by sorting them  thoroughly before  rinsing. After the initial sort and rinse, I like to  put them in a pot  with water and remove those bits that float.  There  are  several ways to prepare the rinsed dried beans.
Traditional Long Soak 
For the traditional long soak method, cover beans with 2” of water,  cover with a lid,  and let the beans soak for 6-8 hours. Drain, rinse,  and put the beans  back in the pot with fresh water to simmer until they  are done - about an hour or so, just check then and see if they are as done as you want them to be. Beans break and split if they are  simmered too hard so keep the heat low. Try making the beans to this point ahead of  time on any day when you have time, cool in a colander, and freeze in containers or freezer zip-lock bags for quick  weekday use.
Quick Soak 
I never remember to get the beans out to soak the day before so I   rarely use the traditional method, and instead use the quick soak method   – cover the beans with 2” of water, bring to boil for two minutes,   remove from heat, cover and let sit an hour or until you remember that  they were still sitting on the stove. Then drain, rinse, and set  to  simmer as above. You can add fat or any seasoning, except salt, at the  start of the simmer if you are heading right on in to cooking your soup or stew or whatever you are making.
Slow Cooker
Pre-soak beans using preferred method, then drain and rinse. Place a bag of beans with 8 cups of water in crock pot.  Set  heat on high and allow to simmer with the top tilted to vent.   Simmer 8  hours, until beans are tender enough to mash. Stirring isn't  necessary,  but feel free if it makes you feel progressive. Drain and proceed as you wish.
Pressure Cook those Beans!
Decide how many beans you want to cook, sort, and rinse. Put the beans  in the pressure cooker and cover with 2 to 3 inches of water. (Do NOT  add salt at this point, as this will make the beans tough.) Put a loose  fitting lid on the cooker, and bring the beans to a boil. Turn down the  heat and simmer for 5 to 6 minutes. Turn off the heat and allow to stand  for one hour. Check to make sure there is enough water to cover the  beans before putting on the pressure cooker lid. Bring the pressure  cooker to temperature, following directions from the manufacturer. Once  pressure is reached, turn down the temperature and cook for 25 minutes.  Remove from heat, and allow pressure to drop by itself. Remove the lid,  and add a small amount of salt, if desired.
Bake the Beans
After the quick or regular soaking method, place the beans in a pot with an oven safe lid. Add enough water to just cover the beans. Put the lid on the pot and bake in a 350 F oven for about an hour and a half to two hours. Check every now and then to see if you need to add more water to keep moist but not overly wet. When the beans are cooked, you may cool and freeze them or continue and add whatever seasonings you prefer.
Use the Rice Cooker!
This fantastic suggestion comes from the comment section of this note!
Another method is to rinse the beans then put them in a rice cooker with  a generous amount of cold water.  They take a couple of hours if they  are not presoaked.  I like pinto beans.  I add rice and seasonings  (cumin, chili powder, a little salt) the last 20 minutes. You can  also add chopped onions, carrots, garlic and so on.  It's faster than a  slow cooker, and they don't get mushy because when the water is  absorbed, the cooker shuts itself off.
To Salt or Not to Salt 
Culinary weapons are drawn and  tempers flare over whether it is  appropriate to add salt or even acidic  ingredients like tomatoes before  the beans are cooked. Many chefs firmly state that the beans will  not  become tender if you add these things at the beginning.  Impressed as I  am by such confident and aggressive chefs - hey, they do wield rather sharp knives - I wait until the  beans are  cooked before adding salt or tomatoes - but you do what you  prefer. I  promise not to argue if you salt first.
Pass on the Gas
 
The baking soda in the water thing is a myth. Do not bother.
Cure #1 - Instead d
iscard the soaking water rather than using to cook. 
Apparently because they are uncooked, they don't lose enough nutrition 
to make a difference. If an overnight soak still has you, uhm, gassy, then proceed to Cure #2.
 
 Cure #2 - Most importantly: Instead of just soaking overnight, soak for 24 hours. Do not use the soak water and flatulence be gone!
For some great bean recipes - see the beans/legumes section to the right under Categories.
Enjoy your beans!