The Space Shuttle was not specifically payload limited on most missions, such that the difference of even 100 lbs on a crew member would have mattered. Soyuz is much the same. Perhaps earlier Mercury and Gemini missions were tighter on performance, and it might have been vaguely considered.
Height however is a bigger issue. Soyuz is quite cramped, and they needed to make some modifications to allow US astronauts, who tended to be taller than their Russian/Soviet partners, and for the female astronauts who tended to be shorter.
In addition, US space suits for EVA have limited ranges in terms of how large and how small they can be sized, which can constrain astronaut selection a bit.