Are you talking about just a plain ol' lightbulb (e.g. 60w) for lighting? There is no real safety problem there if (although for backyard coops this can be a big 'if') all the wiring is done correctly. A bulb only becomes a source of ignition if it is extremely high wattage (which normal lighting is not) or if it is broken and the glowing filament contacts combustables *real quick* before cooling down. If you are still concerned, use the sealed jelly-jar style fixtures often used in barns, so that no dust or moisture can get in to contact the bulb or socket and so that there is essentially zero chance of the bulb accidentally being broken.
If you are talking a high wattage bulb for *heat*, e.g. a 250w bulb, then yes, they are a bit of a fire hazard and should only be used when no other option is available, and then they should be used with all due prudence. This includes fastening them to two different secure points of structure by two different chains or metal cables going to two different parts on the lamp; making sure they are at least 18" from ANY combustables including bedding, walls, ceilings, etc; using the wire guard; keeping them free of dust and cobwebs, esp. if it's been a while since you last turned it on; and using the lowest wattage bulb possible (often a 250 is unnecessarily big).
Rather than relying on a lamp for HEAT, I would suggest investing your time and energy (and money -- those big-wattage bulbs are not cheap to run!) on improving OTHER heat-collecting and heat-retaining features of your coop. Much safer, and usually cheaper too. I have a whole page on this, see the last link in my .sig below.
Good luck, have fun,
Pat