c. 1500, "consisting of money;" 1620s, "relating to money," from Latin pecuniarius "pertaining to money," from pecunia "money, property, wealth," from pecu "cattle, flock," from PIE root *peku- "wealth, movable property, livestock" (source of Sanskrit pasu- "cattle," Gothic faihu "money, fortune," Old English feoh "cattle, money").
Livestock was the measure of wealth in the ancient world, and Rome was essentially a farmer's community. That pecunia was literally "wealth in cattle" was still apparent to Cicero. For a possible parallel sense development in Old English, see fee, and compare, evolving in the other direction, cattle. Compare also Welsh tlws "jewel," cognate with Irish tlus "cattle," connected via the notion of "valuable thing," and, perhaps emolument.
An earlier adjective in English was pecunier (early 15c.; mid-14c. in Anglo-French), from Old French; also pecunial (late 14c.).
"with reference to," used from c. 1700 in legalese, from Latin (in) re "in the matter of," from ablative of res "property, goods; matter, thing, affair," from Proto-Italic *re-, from PIE *reh-i- "wealth, goods" (source also of Sanskrit rayi- "property, goods," Avestan raii-i- "wealth"). Its non-legalese use is execrated by Fowler in three different sections of "Modern English Usage."