How important is it to always buy the most expensive thing that you can with your first buys in Dominion? I appreciate that in the later stages of the game you often have more money than you can profitably spend, especially since the more expensive cards are often very situational. However, in the first three turns or so, how important is it to always buy the most expensive cards that I can afford with my copper?
As a rule, not important. Far better to have a strategy that you follow than to buy the most expensive card you can afford.
The value of a card will vary depending on your deck, and knowing when to buy a less expensive card that your deck needs (or nothing at all) is, I think, part of the transition from a beginner to intermediate player. If there's a Chapel, it's almost always worth spending $3 on it in your first turns, as getting it early is more important than waiting for an unlucky draw with only $2. For certain kingdom sets you might not want any $5's at all, so buying one just because you have $5 would be deplorable.
Similarly, as @thesunneversets points out, Silver is often what your deck needs instead of a $3, $4 or even $5 action if you're not hitting $6 enough for gold. Buy the card your deck most needs that you can afford!
As a very vague rule of thumb, I like buying a Silver on one of my first two turns, to keep my purchasing power from fizzling as my deck gets clogged up with "cool" action cards. What this means in practice is that, if my Coppers divide 5 and 2 over my first two draws, I'll seriously consider buying a Silver with the 5; unless there's a 5-cost action card that really suits my style and strategy. Not doing enough "boring" plays like buying more money is one of the main reasons for people losing Dominion way more often than they should, as far as I can see.
You need to weigh the cards in play, both on their own value plus the value of any combinations you can use them in.
If other players are buying a lot of attack cards, you may want to pick up a defense card on one of the first two turns (Moat, Lighthouse, or Watchtower).
Also, watch what other players are buying. For example, in my games at work (we play every day at lunch), Fishing Village gets sold out very quickly. If you don't buy at least one during the first two turns, there may not be any left to buy.
The value of some cards may depend on what other cards are in play. The value of Smugglers, for example, goes down if Colony and Platinum are in play. The value of Village goes down if any of the other +2 action cards are in play. The value of Horse Traders, Cellar, Witch, Torturer, Sea Hag, Familiar, Montebank, and Young Witch go down if Chapel is in play.
It depends entirely on the strategy you're going for. In the general case, buying the most expensive cards you can afford earlier will allow you to use on average more powerful abilities sooner. Although in the grand scheme of things, these slightly more powerful cards you purchased early on may not play along with your strategy, and may actually slow you down.
In general, it's important to buy the most expensive card you can afford that works with your strategy for this set of available cards. Sometimes, this is a point below the coin I have in hand; my strategies generally don't result in lower than that unless I've got multiple buy as well.
If no cards of the available coin total are going to help, it's worth looking one point cheaper.
Silver and Gold, when available, are usually good choices, but targeted action cards should trump them if you already have plenty.
(Disclaimer: the sets I play are the base Dominion + Intrigue, so things may be different with newer cards.) I usually try to buy two action cards with my first two hands if they combine into a good strategy. If there are no good fours, I would get a silver instead of trying to choose between Thief, Gardens and Feast. If the only five on the table is a Festival, it only works as +2 money in the first five hands or so, and you would still want to intentionally overstock action cards for Festival to make better sense than Silver, which rarely is a good idea (it is kinda embarrassing to play six actions, with everybody looking at you playing the whole deck, gain two more action cards, and only end up with 5 money to buy yourself a Dutchy). If I get two action cards in the first shuffle, and they indeed make up a reasonable strategy, then I make sure to get two or more silvers in the next two hands. With more than two actions in your early deck, chances are you won't be able to use these actions effectively; if you have +actions in them, chances are that the matching action won't come up, and if you have four actions in 14 cards after the second shuffle, chances are you will have too many terminal actions in any given hand. I think my wife always buys a silver with 3 money in the first two hands, even if there's Chapel on the table, and we probably win equally often in our games of three or four with the friends (and more often than the friends do, because the friends rotate, and we stay :) ).
Here's a related, more specific question: with a Coppersmith and four Coppers, should you go for Province in your third hand, or for gold? There was a Coppersmith discussion on SE, although this particular question was only briefly touched upon. (I agree with that discussion that it only makes sense to buy Coppersmith if you can trash it two or three shuffles later, so it must be a pretty peculiar lineup of cards for me to be interested in it as a first buy.)