To me, this is a chicken and egg sort of question. There is no way that you can really say one is more important than the other.
The reason for this is that a person's own beliefs and codes will only make it hard for them to get along if they live in a place with the "wrong" form of government. But, at the same time, the "wrong" form of government is only a problem if you have the "wrong" beliefs and codes.
In this case, which thing is more important -- if you are unhappy, is it because of the form of government or because of you? To me, it is because the two don't match well.
So I suppose you could say it's like saying "this shirt and pants don't go together. Which one is at fault?"
A person's own beliefs and code are definitely important in getting along in society, but whether they are more important than the form of government adopted by a certain country would depend on what kind of elections/government that country has. For example, in a country where certain parts of the society are not represented electorally (such as women or certain ethnic minority groups) then the rights and view of the population as a whole are being fully taken into account. Alternatively, there may be a society where a vociferous minority exercises a rigid and repressive hold on the rest of the community. Generally, in a democracy, balance is best. That way, no one party can get too carried away but is kept in check by the others.
Let me a pose a question to you! Would any form of government allow you to practice your own beliefs and codes? From another angle, would all personal beliefs and codes be allowed in any given form of government? All the possible answers to this question depend on which government and which belief and code. Furthermore, you will need to think about what is meant by society. In fact, let's start with that idea.
If you want to get along in a society in which every single person has the same beliefs and codes as you do, then the form of government probably won't matter to you. But society is like a bull's eye with many rings around it. There is the society of your family, the society of your neighborhood, school, or work, and then the circles get larger. There is the society of your town, your state, and your country. And of course, you are a citizen of the world. If everyone has these beliefs, there is not likely to be a problem with any form of government. (One good example of this is the society in The Giver. With the exception of the giver and then Jonah, when he begins to see what is going on, there is no conflict between beliefs and society.)
One form of government, though, poses a particular problem for people who want to live by their own beliefs. That is a dictatorship. It doesn't really matter what kind of dictatorship it is. There are dictatorships that are monarchies, dictatorships run by the military, and dictatorships that are communist. A democracy without a certain kind of constitution, which limits the authority of the leader or leaders, can become a dictatorship as well. In any dictatorship, your ability to live by your beliefs and codes in any part of society is a function of whether the dictator allows you to do so. So how important your personal beliefs and codes in getting along in society are is a function of how many consequences you are willing to bear.
Sometimes, even in a constitutional democracy people's beliefs conflict with the form of government. A good example is polygamy, which was a tenet of the Mormon Church, a personal belief and code of practicing Mormons. Acting on that personal belief would have allowed you to get along fine in a community of Mormons, but the greater society and the government decided that polygamy was unacceptable and outlawed it. The person whose personal beliefs and actions included polygamy was a person who could end up in jail, even in a constitutional democracy that provides for freedom of religion. Under those circumstances, personal beliefs and codes were important in a particular society, but for most people, the polygamy fell by the wayside because they still had to function in the larger society or pay a heavy price.
If you are expected to write a paper in response to this inquiry, you might approach the assignment by using your own personal beliefs and codes as an example and discuss how important they would be to you in different forms of government, or you might look at extreme cases of personal beliefs and extreme forms of government. You might want to think about people like Joan of Arc, Ghandi, Martin Luther King, Jr, or even Jesus Christ, examples of people who decided their own beliefs were important no matter what kind of society or government they found themselves in. In any approach, it will be easier for you to think about this question with examples. Good luck!
I believe that one begets another. In saying this, I mean that the type of government under which a man lives sets the precedences as to much of what a man develops as a belief system. Most governments are not that different than a man's spiritual belief systems as well. However, when a government undergoes significant changes is when a man begins to question his own moral values to determine if they are alignment with the new system of laws.
For example: during the Nazi regime many Germans went along with the Nazi system and laws because of the propaganda. In many ways it was the Lord of the Flies situation in bigger form. Man was the beast that destroyed the innocents. However, even under those circumstance, there were many people living in Nazi occupied countries who risked their lives to protect the Jews and other non-desirable.