A lightning strike can heat the air in a fraction of a second. When air is heated that quickly, it expands violently and then contracts, like an explosion that happens in the blink of an eye. It's that explosion of air that creates sound waves, which we hear and call thunder . When lightning strikes very close by, we hear the thunder as a loud and short bang. We hear thunder from far away as a long, low rumble.
Lightning always produces thunder.
When you see lightning but don't hear any thunder, the lightning is too far away from you for the sound waves to reach you. Light and sound will always move at different speeds. And lightning will always produce thunder because of a strike's high temperature. So no matter what, you will always see a flash of lightning before you hear thunder.