Before I explain, I would like to correct some other answers. This is rather new an expression and used very much in China, especially by the younger but not the elderly.
It is a usage of sarcasm.
洋 means “foreign”/ “from foreign countries”. 洋葱、洋车、西洋、东洋 are some great examples where it is used in this meaning. But this is an old-fashioned expression, even the elderly don’t use it.
大人 is an old-fashioned expression to call the officials in ancient times, which was abolished after Qing Dynasty. This word implies a sense of inequality. If you call someone 大人, it means they are powerful, and you are inferior to them.
洋 and 大人 together means foreign powerful people.
But it gets more interesting:
In China’s 100-year history of humiliation, Chinese were treated as second-class in their own territories. There was even this park banning Chinese from entering in Shanghai. Many Chinese were used to being inferior and foreigners enjoyed privileges in China.
This is when white supremacy rooted in some Chinese minds.
Then, we return to the beginning of 1980s, when opening and reforming by Deng just started. China was such a poor country, that we envied the material satisfaction of the Western world, Japan or many other countries. We started to think whether it was a fault of our own that made us so poor. Worshipping foreign countries became popular in China, even when China was doing very great in improving economy in 2000s. Foreign countries were some kind of Utopia for Chinese people, because we wanted better life so eagerly.
Thus, foreigners still enjoyed privileges in China, even now, because the foreigner supremacy, especially the whites, has been inscribed in some people’s head.
Thus, these happened:
Little explanation for the first picture: I retracted the picture from a Zhihu special column commenting a news from Nanjing Daily: “Nanjing Daily Praised Hard but I Only Saw Worshipping Foreigners”.
Indeed, I just don’t know why they did this voluntarily for foreigners. There are nationals who are in need and foreigners’ need comes first? And how the hell did those people come up with so many requests? They were helped free of charge and they lived like some kind of princes and princesses from ancient times.
You can search for my other answer, which described another “Yang daren” case in Nanjing Subway, that’s classic as well.
You see, those people are so privileged and think of themselves as first-class in China while some Chinese still adore them.
But lately, things have changed a lot. More and more people realized that all human races are equal and those acts were ridiculous.
So, 洋大人 was invented for sarcasm, to refer to foreigners who are adored and worshipped by some Chinese guys. It doesn’t matter whether the foreigners are good people or not. Who it really is mocking is those Chinese who are despising themselves by those brainless worship.
Another case would be a Japanese who lost his bike in China and the police found it within 24 hrs. It would have be a miracle if they had been so efficient when a Chinese lost a bike. The Japanese was also called a Yang Daren, not because we hated him also, but only to mock the local government.