The Baltics, poland, Romania, Czechslovika and others after the fall of the USSR quickly strengthed ties with the West by either joining with the EU or becoming a NATO member.
Did they just do this because western europe was seen as a more economic friendly/prosperous country?
Those countries were raided by the Russians multiple times in the last few centuries. This wasn't Rome occupying Judea, it was the opposite.
Eastern Europe wasn't always dirt poor and primitive. The Czech industrial output and its GDP before WW2 was higher than that of Austria. Now, as you know, it is opposite.
When Poland was annexed by Prussia, Austria-Hungary and Russia by 1795, the economic differences within the country were minor. After 123 of the occupation/ foreign administration, the country was reunified and discovered that the Russian-occupied eastern part is significantly disadvantaged economically and severely lacks education. Such comparisons don't go unnoticed.
Unfortunately I cannot provide a sourced example for Hungary, and anecdotal 'evidence' is not allowed. I would suggest research in the field of pre-war Hungarian developments in the field of power electronics and railway, which were impressive (private opinion, of course). This is now largely gone.
Summary: Eastern Europeans remember and compare their countries before and after Russian involvement. This comparison isn't favourable for Russia.
Sources: please ask, as I am typing on a small device.
The answer is not so simple and I'll try to break it into several common factors (their impact may vary depending on the country in question).
Common perception was that you improve economy and political stability by joining EU or NATO, instead the other way around. This led to nationwide priorities - join NATO and join EU. This will make your army secure, your economy successful, your politicians honest, your streets clean and so on. You can see the error with reasoning but the process of joining EU and NATO did lead to positive reforms since they were a precondition.
Take an example from this very thread by /u/sheik_yerbouti_jr:
Eastern Europe wasn't always dirt poor and primitive
You can see the stereotype associated with Eastern Europe. Another example is depiction of 'Eastern Europe' in the Eurotrip movie - this is nowhere near actual Bratislava.
The logic goes like this: 'Eastern countries are poor, corrupt, uneducated - we are not therefore we are not eastern.' I've heard on a conference from a Romanian speaker that there was widespread perception (evidenced in statements of politicians, authors, articles in newspapers) that communism moved them to Asia instead of Europe.
Half a century of communism in many ways cut off cultural ties between the two parts of Europe, but combined with greater standard of living and greater personal freedoms in the West created a perception that belonging to the communist world made you a second rate country, if not half-civilized.
By becoming member of the civilized establishment, European union and NATO, you would increase your national prestige and reaffirm your nation as a member of the civilized democratic world. You are not those states... you are part of the serious club. In many countries accession to the EU was seen as affirmation that they too are once again cultural part of Europe, not so much as an important economic goal. Source: I have investigated perception of the EU accession process in media in Hungary, Slovenia and Croatia, pretty much every debate ends up focusing more on cultural reasons than on political or economical ones.
By becoming part of the Western alliance systems they would insure they would not end up in the Russian sphere of influence. A vivid example to that thinking was Poland since Britain and France honored guarantee of independence and declared war on Germany thus starting the devastating World War Two. The implication was clear - an alliance would save them from a possibly resurgent Russia. Plus, you would be allies with the world's only remaining superpower.
Take for example Baltic states - they bordered Russia, economically depended (exports-imports) on Russia, had minorities and were once gobbled up by Soviet Union when the Europe was distracted. They were among first to secede, seek membership in both and diversify economy at all costs. This has disturbed Russia and has proven to be a challenge to Western military planners as they did not initially want a NATO that bordered with Russia which would eliminate its safety sphere.
Russia was seen as a second rate power at best during the nineties. Yeltsin was widely considered to be a drunk, Russia ruled by mafia and oligarchs and so on. Economy in the Russian Federation did not start to show signs of recovery before 1996 and Russia was mostly turned inwards during the early nineties. The trouble with Chechens gave the impression that Russian military is weak. Even if you eliminated animosity for Warsaw pact era, Russia was seen as an economy sustained by the foreign help, not as someone you could count on. Add to that nobody expected Soviet Union to collapse instead of reform during 1991, and during the winter of 1991 there were headlines in newspapers about rumours that both Gorbachev and Yeltsin are sick or dead, leading to impression that Russia is headless. Russian lived on savings during the shock transition of 1992 and their standard dropped and this time standard of living was widely known.
Economical transition. It was different in each country, but there was expectation during 1990-1991 that there could be a new Marshall plan to rebuild Europe from communism. This was not realized since there was a minor recession ongoing plus the main topic in the USA was national debt - there was simply no political will for a second Marshall plan.
Besides that, good relations with the West were tantamount to economic help - loans, free trade, investor interest and so on. European union evolved out of European community which was essentially an economic union and a successful free trade zone.
EDIT: Expanded some points
Sources:
Robert Service, A History of Twentieth Century Russia, 1994
Reviewing the Cold War, Approaches, Interpretations, Theory, ed. Odd Arne Westad, 2000
Ronald Grigor Suny, The Soviet Experiment, Russia, The USSR, and the Successor States, 1998
John W. Young, John Kent, International Relations sicne 1945, a Global History, 2004
Not only did the former Soviet Satellites attempt to seek NATO ties, the Russian SFSR considered it a possibility, at least in the earliest days of the dissolution process. Here is an article from the New York Times dated December 21, 1991 reporting on this. Good relations with the West were, in general, considered a good thing coming out of an era of global isolation. Membership in the EU was considered beneficial for economic reasons, but membership in NATO is a little more complicated. Certainly, good relations with the west are part of this, and NATO is the only military alliance that EU member states are allowed to participate in.
The obvious pragmatic reason why a former Warsaw pact member would want to join a defensive pact with America at its head is to prevent a resurgence of Russian influence by force. Poland, Hungary, the Czech Republic and Slovakia form the "Visegrád Group" attempting to join the alliance. Discussion for accession begin in 1991, with serious talks starting about a month before the USSR dissolves (November 7-8 1991 in Rome). This is a discussion that could only have taken place in the context of a weakening Soviet Union. The USSR let go of its influence in these countries over the 1989-91 period, and they seized the opportunity to jump in bed with the only other alliance bloc in the region - NATO. Membership took years to be fully realized, but eventually went through, even against tepid opposition from Yeltsin in the newly formed Russian Federation.
I'm actually currently wrapping up an undergrad thesis on Poland in the 1980s and I can speak for Poland to some degree but not to the other areas. (Please let me know if I am breaking a rule or am not qualified enough to answer, as I have never answered anything on this subreddit before.)
As /u/sheik_yerbouti_jr stated, these countries have been invaded/raided by Russians for centuries, and in Poland, years of Russian involvement did nothing but strain relations between the two countries. Some recent factors throughout history which contributed to these tensions are various invasions and partitions of Poland (including the Third Partition of Poland in 1795 which temporarily wiped the country off of the map until the end of the first world war), the Molotov-Ribbentropp Pact (leading to Russian and German cooperation in the invasion of Poland in Spetember 1939), the events at Katyn (NKVD massacre of Polish Nationalists), and the general threat of Soviet invasion in 1981 and 1982, which some believe was prevented by General Wojciech Jaruzelski's decision to put martial law into effect (though this is still in dispute today).
In addition to this there were of course economic reasons that Poland would seek ties with the West. Soviet-controlled Poland underwent a series of economic crashes and drastic rises in food prices in the seventies and eighties and was often in serious debt―by the end of 1980 the country was ~$23 billion in debt^* and the economic situation only grew worse throughout the following years. It only made sense to look for better economic options especially when recovering from their position at the end of the eighties.
tl;dr Relations between Russia and Poland were already tense and negative both before and after the existence of the Soviet Union. This, paired with the many problems in Poland's economy while they were under Soviet control, did not bode well for Russia and Russo-Polish relations after the Soviet Union's collapse.
I hope, in some way, that this answers your question. I can point you towards other sources if you are interested in reading more on the subject.
* From Andrzej Paczkowski & Malcom Byrne's /From Solidarity to Martial Law/, Central European University Press, 2007.
A follow up question: Did certain members of the USSR and Warsaw Pact get preferential treatment over other members? If so, in what manner was this treatment given and how is this reflected in their post-Soviet alliances with the West and Russia?