Questions to ask before buying a bike?
If you're buying a new bike at a bike shop I'd do the following:

Ask yourself:
Do you know what type of riding you plan on doing? 
Do you plan to race on this bike and/or commute on this bike?
Do you prefer a specialized bike or a versatile bike? 
Do you have a strong preference to disc vs rim brakes?
Do you plan to use this with racks / fenders, does it have mounts for those? 
What is your budget? How flexible are you on it?  Is it enough to get the bike you actually want? 
Does your budget include accessories like a lock / helmet / bottle cages / fenders / racks? 
How will you lock your bike? (don't use a cable lock if you're parking your bike in the city)

Ask the shop:
Does this bike fit me properly?
Does this bike match the style of riding I want to do? 
How do this bike compare to other bikes made for the same purpose that cost more or less than this model?
Can I test ride the bike?
Do you offer a tune up with purchase?
What essentials should I purchase with this bike?
How much does it cost to install accessories at time of purchase? 
What other maintenance should I have done and at what frequency? How much can I expect to spend on this?
What is the warranty period for this bike and it's components?
Has your shop checked the wheel tension and truing?