Most 3D games use the "lightmap" principle to simulate the differences in brightness that you come across in the 3D environment. If there's some light fixture or a sun visible on the map, the walls etc. are probably brighter in that area. This is caused by the lightmap. You can have a look at the world without the textures by setting R_lightmap to 1. What you see then is only the lightmap.
The lightmap is calculated by the map maker's software. This takes time, from a few minutes to several days. Lightmap quality and resolution varies from map to map. The lightmap of the original Tremulous map "Niveus", for example, is of very high quality. Just look at the shadows casted by the grates that are in front of the ceiling lights.