Which is more significant depends upon the bridge in question, certainly its length and the characteristics of the loading applied. For this discussion I am assuming highway traffic loading.
The question refers to dynamic effects, and it is worth noting that this is more than just impact from striking a pothole. If an elastic single span simple beam is instantaneously loaded with a force, the peak deflection that results is twice the deflection under the same force in the static case, and this effect is unrelated to the effect of instantaneous spikes in applied loading due to vehicles hitting surface irregularities (potholes etc).
For most highway bridges, I believe the dynamic effect is more significant. Fast-but-spaced-out traffic is more onerous than slow-and-bunched traffic. However, this conclusion is based upon the observation that there are more short bridges (spans of up to tens of metres) than long bridges - there is not a general principle that gives one universal answer.
It's relatively simple to determine that for a very short bridge whether the traffic is queuing or not is irrelevant - if the bridge is shorter than one vehicle, only one vehicle (or one axle) will be on the bridge, so whether there is a queue or not does not influence the number of vehicles loading the structure or the loading. Conversely it's easy to imagine that a very long bridge (several hundreds of metres long), one vehicle hitting a pothole will have a negligible effect, since even if the load from that one vehicle doubles instantaneously, if there are hundreds of vehicles on the deck it won't have a proportionately great effect.
In UK practice, trunk road bridges are designed and assessed to Highways Agency documents (so-called 'BD's and 'BA's). The vehicular highway loading is in two 'flavours' - HA is 'normal' traffic, and HB is an arbitrary loading used to examine the characteristics of the bridge under abnormal loading.
HA loading for design is defined in BD37 and the derivation includes allowance for impact - read Appendix A: "the impact effect of an axle on highway bridges can be as high as 80% of the static axle weight and an allowance of this magnitude was made in deriving the HA loading", though the influence of impact reduces as the span becomes greater.
Traffic queues not only give rise to nose-to-tail bunching, they potentially give rise to vehicles squeezing closer side-to-side. In the BDs this is referred to as 'lateral bunching', which is where more vehicles crowd onto the structure.
BD37 allows for both impact and lateral bunching simultaneously - ie, it assumes that you have a tightly-packed traffic jam that's also travelling at high speed. This obviously doesn't happen, but is what the code encapsulates.
When assessing existing structures, however, the UK standards don't apply both effects together. BD21 is the code for assessing structures. Clause 5.23 specifically addresses this question (UDL and KEL are two component parts of HA loading):
"The HA UDL and KEL have been derived using a lateral bunching factor to take into account the possibility that, in slow moving situations, more lanes of traffic than the marked or notional lanes could use the bridge. Probabilistic analysis shows that maximum impact effects, which occur at high speeds, should not be considered together with maximum lateral bunching. Comparison of the effects of alternative traffic speed and bunching situations have led to the conclusion that high speed high impact effect with no lateral bunching is the most onerous criterion for bridge loading. The HA UDL and KEL are therefore to be adjusted in order to eliminate the lateral bunching factor by dividing by
the following Adjustment Factor (AF)"
The adjustment factor is a relatively large number for loaded lengths up to 20m, but tails off to 1.0 (ie divide by 1.0, so don't change the value) at 40m loaded length.
It's not possible to make definitive statements from this (ie, you can't say "below 20m it's dynamic, above 40m it's traffic queues"), because the loading is to some degree empirical and derived after a probabilistic analysis, and includes guesswork (described as "by estimation" in the standard) with allowance for the findings of sensitivity analysis. Again, BD371 Appendix A has discussion of this:
"For long loaded lengths, the main factors affecting the loading are the traffic flow rates, percentage of heavy vehicles in the flows, frequency of occurrence and duration of traffic jams and the spacing of vehicles in a jam. These parameters were determined by studying the traffic patterns at several sites on trunk roads, by load surveys at other sites and, where the required data was unobtainable, by estimation. A statistical approach was adopted to derive characteristic loadings from which nominal loads where obtained. Sensitivity analyses were carried out to test the significance on the loading of some of the assumptions made."
It is worth noting that the above is a bit non-rigorous with respect to spans. The length that matters with respect to load derivation is the 'loaded length', which is not always the same thing as the span. For a single simply-supported span, if you're examining the bending effect, the two are synonymous, but very many bridges are more complex than that (eg, multiple continuous spans, or integral abutments etc). Loaded length is the length over which the element of structure is loaded, and when designing you should choose the length that gives rise to the most onerous effect for the element you are designing for doing the calculations with respect to that particular element. This is often the whole length of a span, but there are cases where (eg) loading a shorter length has a greater effect, particularly in continuous structures, partly because the shorter the loaded length used, the greater the intensity of load to be applied.