\char is a non expandable instruction to typeset a character, it doesn't construct a character token usable in \csname. You want
\input repeat.tex
\repeat\for{xcharcode}\from{`A}\by{1}\to{`Z}\do{%
\begingroup\lccode`\a\xcharcode\relax
\lowercase{\endgroup
\expandafter\xdef\csname a}b\endcsname{{\noexpand\bf \char\the\xcharcode\space}%
}}
\show\Qb
\bye
which makes
> \Qb=macro:
->{\bf \char 81 }.
Note that it is really unfortunate that repeat.tex calls its macro \repeat that name is used already in the existing plain (and latex) macro \loop so loading that file breaks a lot of existing code. You could just use \loop here.
{\count0=`A
\loop
\begingroup\lccode`\a\count0\relax
\lowercase{\endgroup
\expandafter\xdef\csname a}b\endcsname{{\noexpand\bf \char\the\count0 \space}}
\ifnum\count0<`Z
\advance\count0 1
\repeat
}
\show\Qb
\bye
\charcode' here: makes life a bit confusing. Your problem is that\char<number>does not expand to the letter specified by<number>. Could you give more context so we can target what you actually need: there are various 'loop over all the letters' questions on the site already. – Joseph Wright♦ Mar 4 at 17:30