I am currently pursuing my PhD in computer science at a mid-rank US institution (ranked 50 in US-news graduate computer science ranking). Assuming I have a decent publication record and good references. Would I have better chances of securing a postdoc position if I applied to openings in the US or would I have better chances if I applied to openings in other countries such as Canada, UK, Australia?
In short: your chances of securing a position is higher with people that know you (or someone you have worked with).
Whether that is people that are physically around you, or people that are working on the other side of the globe (whom you met in a professional setting e.g. at a conference). This is in line with what @la femme consmique, mentions in the comments, networking is important.
That aside, I have noticed a general skepticism in the U.S. towards Europe. I mean if you are applying for postdoc positions in the US from a European university, you might have to deal with a certain skepticism that does not exist amongst European institutions. It's almost as if you need to convince them that the university actually exists and you haven't made it up on your own (yes, I am exaggerating a bit).
[I would like to make this very clear that this is a subjective statement from personal experience, not a fact.]
I agree with Alexey B. regarding higher chances of being accepted in institution which have one or more research groups in your area despite the country. Also, i would like to add that here in Europe it is highly suggested to spend your postdoc period in another country. This will show that you are truly independent when it comes of research. Although i am not sure whether this apply also in USA or in other countries you might want to consider this aspect too.