The only way you can know is by looking at what the standard of conduct is and comparing it to what it is you have done or are thinking of doing. First of all, is it legal? The Bible tells us to obey the government because God instituted it (Romans 13:1). Secondly, does it go against what the Bible teaches? Again, if it does, it’s immoral.
There are some areas that are not as clearly defined as others. In those instances the action needs to be measured up against other biblical principles. The Bible teaches us to obey the government since God is responsible for putting that government in place. It also teaches us many other things that can serve as broad guidelines in every decision we make in life.