Taking good photos of guns is not easy, particularly if you want to show detail such as engraving, proof marks or faint names.
Almost any digital camera will do but make sure it can focus up close. A mobile phone camera is unlikely to be able to achieve this.
The lighting is the most important thing. You rarely get a really good picture using flash or in bright sunshine as you get high contrast and reflections. Unless you have a studio the best conditions are probably out door on a bright but overcast day, which gives a nice even light which will pick out those important details. The background is also important – not too light or too dark – something neutral like a wooden table or bench is ideal or a piece of neutral carpet. When photographing detail take several shots from slightly different angles and tilting the gun ever so slightly to get the light just right can make a huge difference to what you can see. The good thing with a digital camera is that you get instant results and you can take lots of pics at virtually no cost.