The Short Version
Thunder is caused by lightning, not by clouds colliding. A lightning discharge rapidly heats the surrounding air, making it expand explosively and generate the shock wave heard as thunder. Major meteorological and scientific sources consistently describe this mechanism and provide no support for cloud collision as the cause.