Firstly, Tinderbox follows general conventions but in its own manner to asking oneself is it like C, Python, whatever, is likely not a good start.
In Tinderbox’s original incarnation, in 2001 [sic], action code strove to be quite loose: write what you mean and the app will parse the meaning. So you might write:
Color = blue
or
MyString = O'Driscoll
But by c.v4.5.0 (August 2008) as action code grew in complexity, added dot-operators, subsumed query syntax, and—via value() and ^value()^—subsumed use of much of export code operators the old looser syntax was deprecated in favour of more explicit encoding:
$Color = "blue";
$MyString = "O'Driscoll";
Note: the old forms still work. At least they do if simple code. But being deprecated syntax/usage, if they fail, the user will need update their code.
Why this ambiguity of usage? Several reasons. Firstly, Easgtate has a commendable track record in not breaking old automation. Not everyone has a coding background and many have action code that is once-and-done. Make it and then never touch again. Vicariously breaking that just for new features plays out differently for new vs. long-term users. Not everyone wants to, or knows how to, fix/updates old code.
So what might seem like thoughtless ambiguity for the new user of the app, is quite the reverse. Thoughtful consideration fo the long haul.
Most notable in the newer examples is the enquoting of 'literal string values: in plain terms, pieces of actual text as opposed to operators, variables, etc. ‘Straight’, not typographic ‘curly’ quotes, are used. These can be matched pairs of single or double. General convention—but not a requirement—is to use double straight quotes, only using single quotes where it is necessary. But you are free to choose. One matched pair can enclose uneven number of the other type:
$MyString = "The title '"+$Name+"' is used for this note";
$MyString = 'The title "'+$Name+'" is used for this note';
The above both work albeit one outputs the title in single quote and on in double quotes.
So far, so, goof, by what about escaping. In literal strings (and some string-based attribute inputs), a backslash before a character implies “use this characters and not its special meaning” (e.g. for regex, etc, etc.). But…
Tinderbox does not allow escaping of straight single or double quote characters.
So, for complex scenarios—that most will likely not encounter—you may need to use an approach like the last example above or to park strings into string-type variables as you build what would otherwise be complex use of differing quote types. Also, if the quotes are in literal text, these days (with unicode!) if you actually want, or could use, typographic single/double quote in literal text, do so!
Does this give enough detail or do you have a deeper question?
HTH 
[sorry for the long answer, I’ve a sense the eventual outcome might be a new aTbRef article]