If the awk command is single quoted, the $2 is not interpreted by the shell, but is instead passed as the literal string $2 to awk. awk will then print the second space delimited token in the input string, which in this case is a.
echo "line1 a b c" | awk '{ print $2 }' # prints the second space-delimited token
> a
If the awk command is double quoted, the $2 is interpreted by the shell. Because $2 is empty (in this case), the empty string is substituted. awk sees a command which looks like awk "{ print }", which is an instruction to print everything.
echo "line1 a b c" | awk '{ print }' # prints all input
> line1 a b c
It is also possible to use double qotes, and escape the $, which will cause the $ to not be interpreted by the shell, and instead the $2 string will be passed to awk.
echo "line1 a b c" | awk "{ print \$2 }" # prints the second space-delimited token
> a