As well as the precision of the displayed number (as answered in the other solutions), there is the issue with the missing node. In the first foreach loop the last node is not displayed because PGF thinks that the next value is 0.50003 which is more than 0.5 so is outside the bounds of the loop.
As Symbol1 said in the comments, it is best to use integers in the loop when using the ... syntax to ensure that this sort of thing doesn't happen. This then means that the coordinate calculation needs changing, but this is easy to incorporate. Slightly more complicated is computing the displayed number. This can be done either in the node text itself using pgfmathparse{\x/10}\pgfmathprintnumber[fixed, precision=1]{\pgfmathresult} or it can be done in the foreach loop itself (which is more useful if you are going to use the number more than once).
\documentclass{standalone}
%\url{https://tex.stackexchange.com/q/610368/86}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\foreach \x in{0,0.1,...,0.5}{
\node[] at (20*\x,0) {\x};
}
\end{tikzpicture}
\begin{tikzpicture}
\foreach[evaluate=\x as \displayx using \x/10] \x in{0,1,...,5}{
\node[] at (2*\x,0) {\pgfmathprintnumber[fixed, precision=1]{\displayx}};
}
\end{tikzpicture}
\end{document}

in{1, ..., 10}whenever possible. You can always divide later – Symbol 1 Aug 12 '21 at 03:51