The addition of an appropriate border can make a significant contribution to the presentation of an image. In the digital darkroom it is extremely quick and easy to achieve, and the possibilities are limited only by the imagination of the photographer.
The simplest technique is probably to add a single black or grey line to the edge of an image. There are many ways of doing this, and some are described in detail elsewhere on this website.
If there is a guiding principal worth quoting in relation to borders is it probably that whatever is done should be unobtrusive, and err on the side of simplicity. A poor picture is unlikely to be much improved by the addition of numerous lines of various widths and colours, perhaps combined with poorly-judged decorative corners. The author would be better advised to settle for a simple black line a few pixels in width placed a few millimetres from the edge of the image.
Borders should also be drawn with the design of the mount, and where applicable the frame, in mind. Well-chosen and executed design combinations provide context, depth and a touch of class to a displayed image. However, when a mount and image are brought together, inaccurately placed borders and poorly-cut mounts become all too apparent.