I used to work at a pet store (plus much independent studies and years on reptile forums) and successfully rescued 3 beardies, so I've definitely got some advice ;)
Flooring - definitely avoid sands unless you sift natural sand such as playground sand. The stuff you can get from pet stores is not good for any lizards, especially calcium sands, which can cause impactions. Just from personal experience, you may want to give your beardie a box of sand so they can dig, because that stuff gets everywhere. I have used everything from newspaper to sand to slate tiles, and I'm now using linoleum flooring for ease of cleaning. Tiles can be nice, but keep in mind that when your dragon poos that it'll get in between all of the little nooks and crannies of the substrate. This goes doubly so for sand.
Tank - Definitely go with a 40 gallon. Juvies will do just fine in a larger tank, and you can always cordon off a smaller area. It will save you money in the long run since you won't have to size up your tank after your beardie grows a few inches (and babies grow fast!). Tanks larger than 40 gallons are difficult to find that suit beardies and don't cost an arm and a leg or weigh a ton. Avoid 55 gallon tanks, they're only a foot wide and your beardie will have a hard time turning. 40 gallons are 18" x 36", and most beardies will get to be around 18 - 22 inches total.
If you want a really nice cage, I've always drooled over
http://www.cagesbydesign.com/t-hybridreptile.aspx. Expensive, but worth.
There are a few tutorials out there for building your own cage. Provided that you have the tools required, this is probably the most cost effective way of getting the best bang for your buck. Back when I was on the bearded dragon forums, this was the favored custom cage plans -
http://www.freewebs.com/crossfireenclosures/
Live Food - You are correct, meal worms aren't the best for beardies. Too much chitlin (shell) and not enough nutrition. I would plan for crickets, but be prepared to go through a lot during your beardie's first year. Mine would pack down 20-30 in a single sitting and stare at me like they were starving. I would also avoid pellets, I know they've come a fair ways in recent years but none of mine would touch the stuff. Collard greens are a great staple food, plus they can be frozen and keep for a few months. A lot cheaper than pellets in the long run, trust me :) You can keep live bugs in larger tupperware containers or moving boxes, just if you have crickets be warned - the @#)(!@# thrice accursed insects can escape from sealed plastic bags. I just had this happen about 2 nights ago. Was not fun.
Here's a great website with beardie nutrition facts -
http://www.beautifuldragons.com/Nutrition.html
Just a few other pieces of advice~
Keep one beardie per cage. There will always be a dominant beardie in the group, and with two in a cage one won't get enough food, plus there's the possibility of breeding, fights, etc. I've seen a few bad incidents caused because one beardie was agressive.
UVB lighting - Don't skimp! 10.0 Reptisuns work great, I like using the fluorescent tube style. Always change your light out every 6-8 months or your dragon will get Metabolic Bone Disorder. UVB light allows diurnal reptiles to process calcium, and without it their bones will become soft and easily broken/twisted. Kana, one of my rescues, has permanent damage to her ribs due to MBD, and I have to be super careful to make sure she doesn't get any worse.
Food part 2 - Order your proteins in bulk if at all possible, it's much cheaper than buying from the pet store every week. Crickets are a total pain to keep, however, there are other options for feeder insects. Superworms are great once your beardie hits the 15" length from nose to tail tip, there is a bend in their GI tract that gets a bit wider so they can handle the hard shells. Phoenix worms are amazing, not only for their nutritional content but also for how beardies go nuts for them.
Food part 3 - Babies should eat about 75-90% of their meals as protein and the rest as salad. Adults should eat about 75% salad/25% protein.
Food part 4 - Beardies are notorious for changing their tastes. What they devour one day they may not touch the next. Switch up greens and add fruits to get them to eat their salad.
Good resources - Aside from the already linked stuff, the forums over here -
https://www.beardeddragon.org/ are a magical collection of knowledge. It's my go-to for any new questions I may have
Plan on saving about $300 (
https://www.beardeddragon.org/articles/newbies-guide-what-to-buy/) for the initial purchase of supplies and dragon if you're in the US, and don't be afraid to visit reptile shows! They'll often have gorgeous, well bred dragons for sale. Also, be very wary of what people at the box reptile stores tell you. Sadly, reptile care isn't taught correctly, and often kits are junk. You're better off buying the things you need separately instead of as a kit. I'd recommend the bd forums as your primary source of information ;)
You'll likely spend about $35 every 6 months on a UVB bulb, at least $20 a month on food (especially when they're babies).
Sorry if I rambled/gave too much info, I used to do this over on the bd forums a lot ^^;