Sprinklers put out fires in an area of 7x7. They also require a water source. They do not replace calling the emergency services to extinguish the fire, they just help them.
It is recommended to use Drains along with sprinklers to get rid of any excess water they have produced.
Prisoners can also start fires with lighters, so it can be a good idea to place sprinklers in maximum security areas, as maximum security prisoners are more volatile.
It is also a good idea to install sprinklers in cells, ESPECIALLY in the maximum security cells, because prisoners are most likely to start the fire by being upset by a lockdown or punishment.