It's really up to you. I use a combination of both, depending on my needs and who has what I want. I don't know of any walk-in retail stores where I can pick the motherboard, ram, etc. that I want, so I buy these online.
If it's your first and only system, I'd buy the motherboard, CPU, RAM and heatsink/fan at the same place. I say this mainly because it's easier to troubleshoot if you run into problems. With different vendors, there's a good chance that there will be a lot of finger-pointing...not necessarily unjustified.
If you already have a similar system, you can basically purchase wherever you want to. For instance, if the RAM doesn't work in the new motherboard, you could try it in you existing board to isolate the problem.
If price is an issue, then you need to balance sales tax against shipping charges. Plus, if you need to return a part, it's a lot easier to hop in the car and run to the store than to ship it back...usually at your expense.
With all that said, I purchase just about all of my "base computer" parts online. I usually ending up getting the peripherals locally.
Finally, if you're concerned about an online vendor's products and service (and who isn't?), see if they are listed at <A HREF="http://www.resellerratings.com" target="_new">http://www.resellerratings.com</A>.
Mike