user10075: As a low rated player myself, I often see people play h6 as black before playing Nf6, presumably to stop pins on g5 and things like the Fried Liver. Example:
[fen ""]

1. e4 e5 2. Nf3 Nc6 3. Bc4 h6?!

I keep hearing that such moves are an unnecessary waste of time, which would be better spent developing pieces.
Is h6 to allow the Knight to move to f6 justified? Should I be developing it to f6 at all?

user3456: Actually each level of play has its own valid rules which become invalid on a higher level. I recommend sticking with "inferior" moves as long as they bring success against your usual opponents, no matter what the stronger players have to say. After you progress, you will outgrow the rule and will no longer ask.

user10342: The way you've described h6, preventing the annoying Bg5 pin, is called a prophylactic move. They definitely have their uses, and you often see both sides going h3 and h6 after castling later in the game to prevent a later back-rank checkmate, BUT every stage of the game has its own priorities. In the opening, the focus is on establishing a center, developing your pieces, and castling. h6 this early on doesn't help accomplish any of these three objectives and as such should be considered a weak move. Look at it in this light, White generally has a small advantage in the opening by virtue of having the first move. h6 is, in the opening, essentially a do-nothing move, which can only put white further in the drivers seat.
Also as a rule of thumb, Bg5 pins are only worth preventing if you've already developed your dark-square bishop with Bc5 or Bb4 (so that you don't want to play Be7) and you cannot break the pin with a queen move e.g., Qd6.
[FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]
1.e4 e5 2.Nf3 Nc6 3.Bc4 Bc5 4.O-O Nf6 5.Re1 O-O 6.d3 h6 {You might want to consider playing h6 here, now black is mostly developed, and has his bishop on c5, so Bg5 could potentially be annoying}


user8300: The thing with h6 is that, in the opening, the move has one purpose for Black: prevent White from placing a piece on g5.
The drawbacks of the move are that:

It's a tempo investment. Tempos are important not to waste in, for example, open positions, where it is good to get your pieces out to active squares as early as possible.
It potentially weakens your kingside if you decide to castle short. A pawn on h6 can become a target for a piece sacrifice if White decides to launch a kingside attack.

So basically, you shouldn't make the move h6 out of habit. It should be played after carefully considering the consequences of letting an enemy piece reach g5. Does White even want to play a light piece to g5? If not, then why waste the tempo?
This of course applies to the pawn push h3 in the opening for White, and also in some sense the pawn pushes a3 and a6, although the latter two can often have other purposes as well, as in the Sicilian, for example.

user550: In addition to the useful points in Scounge's answer, I'd add that often the move ...h6 is a waste of time because it's being played at the wrong moment. To use an example from an opening I am familiar with, I play the Scotch Gambit and often find my opponents play this:
[fen ""]

1. e4 e5 2. Nf3 Nc6 3. d4 exd4 4. Bc4 h6

Now, if your main aim is to avoid a knight pin after ...Nf6 or you want to stop Ng5 then this seems logical, but the move is simply bad for several reasons:

White has played a (temporary) gambit for a lead in development by not immediately recapturing on d4. By not playing an active developing move you're exacerbating this.
White is also not really planning to play Ng5 or Bf5 in this position. Without going into too much irrelevant theory, White isn't playing with a pawn down in order to start an attack but instead to speed up development and hopefully then make something of it. 

These points should lead you to conclude that allowing a move to f5 is less of a worry at this stage, and you should instead play something that develops naturally (FWIW 4...Nf6 is the book move in the above position). You can apply to the same reasoning to other openings, even though the specific things to consider are almost certainly going to be different (e.g. in the position in the question white isn't playing down a pawn, but instead has different ideas in mind).
Indeed, you'll find if you look at a lot of opening theory that the moves h3 and h6 do appear quite a lot, but they appear at very specific points where that player has nothing more useful they could be doing or there is a specific impending attack that they want to defuse.

10075: <p>As a low rated player myself, I often see people play h6 as black before playing Nf6, presumably to stop pins on g5 and things like the Fried Liver. Example:</p>

<pre><code>[fen ""]

1. e4 e5 2. Nf3 Nc6 3. Bc4 h6?!
</code></pre>

<p>I keep hearing that such moves are an unnecessary waste of time, which would be better spent developing pieces.</p>

<p>Is h6 to allow the Knight to move to f6 justified? Should I be developing it to f6 at all?</p>
 3456: <p>Actually each level of play has its own valid rules which become invalid on a higher level. I recommend sticking with "inferior" moves as long as they bring success against your usual opponents, no matter what the stronger players have to say. After you progress, you will outgrow the rule and will no longer ask.</p>
 10342: <p>The way you've described h6, preventing the annoying Bg5 pin, is called a prophylactic move. They definitely have their uses, and you often see both sides going h3 and h6 after castling later in the game to prevent a later back-rank checkmate, BUT every stage of the game has its own priorities. In the opening, the focus is on establishing a center, developing your pieces, and castling. h6 this early on doesn't help accomplish any of these three objectives and as such should be considered a weak move. Look at it in this light, White generally has a small advantage in the opening by virtue of having the first move. h6 is, in the opening, essentially a do-nothing move, which can only put white further in the drivers seat.</p>

<p>Also as a rule of thumb, Bg5 pins are only worth preventing if you've already developed your dark-square bishop with Bc5 or Bb4 (so that you don't want to play Be7) and you cannot break the pin with a queen move e.g., Qd6.</p>

<pre><code>[FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"]
1.e4 e5 2.Nf3 Nc6 3.Bc4 Bc5 4.O-O Nf6 5.Re1 O-O 6.d3 h6 {You might want to consider playing h6 here, now black is mostly developed, and has his bishop on c5, so Bg5 could potentially be annoying}
</code></pre>
 8300: <p>The thing with h6 is that, in the opening, the move has one purpose for Black: prevent White from placing a piece on g5.</p>

<p>The drawbacks of the move are that:</p>

<ol>
<li><p>It's a tempo investment. Tempos are important not to waste in, for example, open positions, where it is good to get your pieces out to active squares as early as possible.</p></li>
<li><p>It potentially weakens your kingside if you decide to castle short. A pawn on h6 can become a target for a piece sacrifice if White decides to launch a kingside attack.</p></li>
</ol>

<p>So basically, you shouldn't make the move h6 out of habit. It should be played after carefully considering the consequences of letting an enemy piece reach g5. Does White even want to play a light piece to g5? If not, then why waste the tempo?</p>

<p>This of course applies to the pawn push h3 in the opening for White, and also in some sense the pawn pushes a3 and a6, although the latter two can often have other purposes as well, as in the Sicilian, for example.</p>
 550: <p>In addition to the useful points in Scounge's answer, I'd add that often the move ...h6 is a waste of time because it's being played at the wrong moment. To use an example from an opening I am familiar with, I play the Scotch Gambit and often find my opponents play this:</p>

<pre><code>[fen ""]

1. e4 e5 2. Nf3 Nc6 3. d4 exd4 4. Bc4 h6
</code></pre>

<p>Now, if your main aim is to avoid a knight pin after <code>...Nf6</code> or you want to stop <code>Ng5</code> then this seems logical, but the move is simply bad for several reasons:</p>

<ul>
<li>White has played a (temporary) gambit for a lead in development by not immediately recapturing on d4. By not playing an active developing move you're exacerbating this.</li>
<li>White is also not really planning to play <code>Ng5</code> or <code>Bf5</code> in this position. Without going into too much irrelevant theory, White isn't playing with a pawn down in order to start an attack but instead to speed up development and hopefully then make something of it. </li>
</ul>

<p>These points should lead you to conclude that allowing a move to f5 is less of a worry at this stage, and you should instead play something that develops naturally (FWIW <code>4...Nf6</code> is the book move in the above position). <strong>You can apply to the same reasoning to other openings</strong>, even though the specific things to consider are almost certainly going to be different (e.g. in the position in the question white isn't playing down a pawn, but instead has different ideas in mind).</p>

<p>Indeed, you'll find if you look at a lot of opening theory that the moves <code>h3</code> and <code>h6</code> do appear quite a lot, but they appear at very specific points where that player has nothing more useful they could be doing or there is a specific impending attack that they want to defuse.</p>
