The chemical structure of the dicyanogen photopolymer (CN)x, also known as paracyanogen, prepared in different solvents from dicyanogen (CN)2 photopolymerization under the action of ultraviolet light, is shown to be very similar to the polymer derived from hydrogen cyanide (HCN) and from certain tholins obtained from a simulated Jovian atmosphere. The implications of dicyanogen and its polymer as a precursor of some organic molecules already detected in cometary comas and tails and in meteorites are discussed. In particular, paracyanogen may be present in the cometary nuclei and in the surface of certain low-albedo objects in the Solar system.