As mentioned in the comments, the first version is the TeX version of assignments, the second version is the LaTeX version of assigning values to variables. Both usually yield the same result, as the second one is based on the first.
The second version is less error-prone, though, because it's equivalent to
\extrarowheight=0.5ex\relax which prevents the parser from accidentally mistaking extra characters after the assignment to be part of the new value.
Note however, that the third version is not equivalent to the other two, and wrong in that sense. It doesn't do a variable assignment but redefines
\extrarowheight to be a macro which expands to the token sequence
0.5ex. You can see the difference when you try the following:
In some cases the use of that macro will still yield the same result as the use of the variable, but as soon as you try to set the variable the correct way, the problem becomes apparent:
0.5ex1.0ex instead of doing an assignment.