In my case, locally isn't much of an option because I have very little choice available. I don't locally because the available choices are next to nothing, I have but 20 motherboards, maybe 10 different CPUs, 30 varieties of RAM, and the like. Online, with just one store, this gets multiplied by a dozen (or maybe 2 dozen) so I can really fine tune things. Multiple stores expand this out still more. For things where vision is key, such as screens and displays, going there and seeing it first hand is the best route.
There are 3 downsides to ordering online: payment, shipping, and returns. Ordering online requires that you have either a credit card or debit card and you must have a bank account. Paypal also works, for places that accept it (though a bank account is still needed). The worst part about the payment is if the server gets hacked into - your card number can get stolen this way. Fortunately, this is rare. No server is immune to hacking. Locally, you can just bring cash or pay by check (if the place accepts checks).
The second downside is that, instead of waiting only an hour or so to go there, get the item, and come back, you have to wait days or even a week for your item to get shipped. Ordering online is recommended if you don't need the item otherwise right this second. If you can wait 5 or 6 days (3 or 4 if not over annoying weekends), then ordering online is often the way to go.
The third downside is that not all return policies are friendly. Waiting 5 days is bad enough, but waiting an extra 8 or 9 days because of a defective item can really be trouble some. Not only that, but, should the item be heavy, you're stuck with having to pay a considerable shipping fee. I would think that online retailers should refund the return shipping if and only if the item is proven to be defective (and not from user mishandling and the such).
A neutral aspect comes with small items. A 6-foot USB cable, for example, may only go for $3 on a retailer, but you pay twice that in shipping. You're often better off buying such cables and other cheap items locally.
The only weak point with ordering online is groceries - they are often very restrictive as to where they can ship, even for nonperishable goods (technically, everything will perish, but 3 days versus 2 years is a big difference). I'd order my groceries online if I could.