Decimals in table don't align with dcolumn when bolded

\textbf takes you out of math mode and gives you a text mode setting, which in principle is not using the math fonts at all (although in the computer modern setup digits and . do in fact come from the text roman font)

You would lose the alignment anyway as dcolumn needs to see the . at the top level not inside a group.

D is defined via \newcolumntype so you need to define a similar column say B that also inserts \boldmath

(Note your example generates several unrelated errors when run, please test before posting!)

enter image description here

\documentclass{article}

\usepackage{booktabs,dcolumn}
\begin{document}

\newcolumntype{.}{D{.}{.}{-1}}
\makeatletter
\newcolumntype{B}[3]{>{\boldmath\DC@{#1}{#2}{#3}}c<{\DC@end}}
\makeatother
\begin{tabular}{l .}
\toprule
M & \multicolumn{1}{c}{N} \\
\midrule
5 & 12.0 \\
10 & \multicolumn{1}{B{.}{.}{-1}}{24.0}\\
\bottomrule
\end{tabular}
\end{document}

The . will be aligned exactly using the above, but the default bold digits are wider than the standard ones so alignment will be out. this may not matter if you only have one or two digits but to use the non-extended bold easiest is to define a version of \boldmath that uses b rather than bx.

enter image description here

\documentclass{article}

\usepackage{booktabs,dcolumn}
\DeclareMathVersion{nxbold}
\SetSymbolFont{operators}{nxbold}{OT1}{cmr} {b}{n}
\SetSymbolFont{letters}  {nxbold}{OML}{cmm} {b}{it}
\SetSymbolFont{symbols}  {nxbold}{OMS}{cmsy}{b}{n}

\begin{document}


\newcolumntype{.}{D{.}{.}{-1}}
\makeatletter
\newcolumntype{B}[3]{>{\boldmath\DC@{#1}{#2}{#3}}c<{\DC@end}}
\newcolumntype{Z}[3]{>{\mathversion{nxbold}\DC@{#1}{#2}{#3}}c<{\DC@end}}
\makeatother
\begin{tabular}{l .}
\toprule
M & \multicolumn{1}{c}{N} \\
\midrule
5 & 11112.0 \\
10 & \multicolumn{1}{B{.}{.}{-1}}{11124.0}\\
19 & \multicolumn{1}{Z{.}{.}{-1}}{11124.0}\\
\bottomrule
\end{tabular}

\end{document}