Denmark was interested in Vieques OTL, but did not capitalise on that interest. Like Denmark, Brandenburg was also interested in Vieques. Denmark could perhaps if the situation allowed for it to conquer Puerto Rico. The Danish could attempt so even without Vieques as practical base, since they already owned possesion nearby within the Danish West Indies. Brandenburg did not have a outpost that close to Puerto Rico. Though Brandenburg did claim Vieques once, though they abandoned the claim in the favor of Denmark. Still, while owning a nearby base makes facilitating the conquest of Puerto Rico easier, it is not a must. Brandenburg was also involved in minor scuffles with Spain, mostly involving Brandenburgian privateering of Spanish shipping. Puerto Rico had a low population up to around 1800, when mass immigration began greatly increase the population growth rate. This means that is possible, but not guaranteed that Danish or Brandenburgian rule could shift the culture of the island thru migration.
I don’t really think it’s very likely, if Denmark gain anything major like Puerto Rico, it would be a bribe for taking part in a conflict, which benefitted them little in Europe. So it would pretty much need to be the Spanish Succession War, but the only way I could see Denmark join that war, would be if France hadn’t shown Denmark in Scanian War why you don’t mess with it or its allies.