A lot of 8 bit systems had a clock tick that was tied to the video vertical refresh rate (which varied slightly between PAL and NTSC systems). The Commodore 64 called theirs a “jiffy clock” and you could measure time by counting “jiffies”.
Since these clocks tended to be down in the millisecond range, you could generate a fairly random 8 bit number fairly easily just by measuring how long it took someone to press the start button for the game. That gives you a fairly random number to use as a seed value, which you can then shove into a pseudorandom sequence generator to create your “random” numbers.
The Commodore 64 also had a hardware random number generator, similar to the previously mentioned Atari. The Commodore had a sound chip that they called SID (for Sound Interface Device) that was a fairly primitive sound synthesizer. It had four modes of operation: sine wave, square wave, sawtooth wave, and noise. SID had a built-in A/D converter that could convert the noise signal into a digital random number.
The Commodore 64 also had a pseudorandom sequence generator built into its ROM. You started with your seed value, and every call to that particular ROM subroutine would return the next number in the pseudorandom sequence. You could use the jiffy count method to generate your seed, or you could use the SID hardware method to generate your seed, or you could put in a known integer value as your seed so that you got the same sequence every time (useful for debugging).
Most 8 bit machines did not have a hardware random number generator built into them and instead relied on things like clock tick counting to generate their random seeds.