This happens in one of two cases:
1. Your texture scales have a huge ratio (e.g. X scale is 4 when Y scale is 0.1). Texture scale should have an aspect ratio of 1:1, avoid extremes like 10:1
2. The texture projection axis is perpendicular to the face
In other words, a texture gets suuuuuper stretched, like spaghetti. This causes issues with lightmapping.
The first one happens when you use Fit on an entire brush which is very thin (e.g. a door which is very thin, like 4 units) - several sides will become extremely stretched. When you use it, please only select the faces that actually need fitting, usually it's just one or two faces.
For the second one, you need to change the texture projection, tick either World or Face in the Texture Application tool. You can also read
Error: Texture axis perpendicular to face for a more visual illustration of this problem.