First two articles describe free tool (SBC PicOpt) for creating sprite atlases we use in our games. It can not only create optimized atlas but it allows you also manage your custom properties for sprites (like collision boxes, etc.)
It features also possibility to force POT export, include empty spaces between sprites or repeat top, bottom, left and right rim of the sprite which is very usefull to prevent artifacts in 2D openGL games. Also creating simple animations is possible.
With tool you can easily create sheets like this with minimum effort:
There is also description of format of output export files.