I have a little bit different opinion about \bgroup versus \begingroup than the previous answer. First, I give a short explanation about TeX internals:
The { and } (more exactly the tokens with catcode 1 and 2) have four different meanings in TeX:
they are the syntactic part of macro definitions: \def\foo...{...}
each sequence of tokens scanned as single token list in TeX (i.e. in the parameter of a macro, inside macro definitions...) have to be balanced text by these tokens: \macro{param{e}ter}.
they are a part of several TeX primitive constructions, for example \hbox...{...}, $e^{...}$, \write...{...}.
when they are used without any context mentioned above they open and close the group.
The \bgroup and \egroup are declared by \let\bgroup={ \let\egroup=} and you can replace { and } by \bgroup and \egroup only in the third and fourth meaning mentioned above. For example:
\hbox ... \bgroup ...}
\hbox ... {...\egroup
\hbox ... \bgroup ...\egroup
$e^\bgroup ...}$, $e^\bgroup...\egroup$
\write ...\bgroup ...}
The last line in the example is another exception: you canot replace the closing brace by \egroup if the syntactic rule <general text> (like in \write parameter) is applied.
The \bgroup and \egroup without the context mentioned in the third meaning above open and close a group. The same work do primitive commands \begingroup and \endgroup but only this work. They cannot be used instead of { and } in the first to third meaning mentioned above.
This means that always you can use \begingroup and \endgroup, it is possible to use \bgroup and \egroup with the same effect. But the nested groups have to be terminated by the appropriate counterpart, they cannot be crossed. And in math mode, there is a little bit different behavior, see comments.
I am preferring \bgroup and \egroup instead \begingroup and \endgroup. Only, if I see that the nested group crossing error would be usable for users of my macros then I use \begingroup and \endgroup.
\begingroup...\endgroupalso behaves differently in math mode, in which{...}or\bgroup...\egroupcreate a subformulae with different spacing. A good rule of thumb would be to avoid using\bgroup...\egroupunless you know you need them. – Will Robertson Aug 18 '10 at 10:05\begingroup...\endgroup. – Joseph Wright Aug 18 '10 at 18:35define semi_simple_group = 14 {code for '\begingroup...\endgroup'}. In e-Tex, the \tracingmacros command allows you to see the semi-simple groups being called such as you enter and exit them during expansion. – Charles Stewart Dec 02 '13 at 13:40{}always go first, and if they don't work we should try\begingroup ... \endgroup. Only in cases that we may need unbalanced braces, such as define a new environment, should we use\bgroup ... \egroup. – Ch'en Meng Aug 23 '16 at 04:37