I'm booked on a flight that departs in 36 hours and the plane is currently less than half full. Do airlines have a general rule that prohibits you from sitting in a seat other than the one you were assigned? If there is an empty aisle seat when the door gets closed, can I take it?
On take off and landing, weights and balances on the aircraft may be such that you are required to be seated in the seat that you are assigned - if you move around the cabin too much, it may cause issues for the aircraft.
After take off, you may be allowed to move seats - but at the end of the day, the cabin crew have final word, they do not have to allow you to move seats, they can require you to remain seated in your own seat. In many jurisdictions (including the US, under the wording of Federal Aviation Regulation 14 CFR 121.580), it is a criminal offence to disobey a lawful order given by a member of the cabin crew, so if they say "stay", you stay.
I've flown on many aircraft which were basically empty, and have had no issues with the cabin crew regarding moving seats once airborne. If in doubt, just ask a crew member and unless there is some issue you are unawares of, you will almost certainly just get a "go for it".
I've moved many times. The only time it was even the slightest issue is when the original occupant of the seat moved away and I moved into it and some official came looking for the original occupant. I told them what happened, that was the end of it.
1) Do not move between classes. Note that the nicer seats at the front of the economy section on some airlines count as a different class for this.
2) Stay in the same row during takeoff and landing unless the flight crew says you are free to move about. (I've seen this happen on lightly loaded flights--they know there are empty rows and suggest people move to them.) I am aware of one flight (small plane) that crashed when everyone moved forward. They were more afraid of the loose alligator than the pilot screaming to move back. They should have been more afraid of the pilot screaming.
3) On a small plane stay on the same side unless you're told it's ok. Everyone moving to one side to look at something can be a problem.
Unless there's a reason not to, FA's will usually be fine with it. Of course they are aware of those reasons, so I would be gentle asking "why" - don't presume cruelty on their part.
It could have to do with upcoming boardings: Moving you will mean moving you back when the next passenger arrives, as well as cleaning up behind you - the FA doesn't know you're fastidiously neat.
It also may have to do with seat class: Those empty seats may be extra-legroom bulkhead or exit row seats, for which they charge extra. Moving you into them would be a "comp" they're not allowed to give you.
The scariest reason is aircraft balance. The airplane interior is a "see-saw" pivoting on the wings. When you move forward or back, the seesaw rocks. The pilots (realistically autopilot) counterbalances that with the elevator (horizontal tail) and its trim feature. Those have limits: if they are exceeded, the plane will crash. A gradual change (large airplane, bathroom queue) should be detected by the pilots; a sudden change will be too fast to fix, especially at takeoff. There's a lesser issue with left/right balance, too.
On a big airplane they can influence balance by how they load cargo, but that only works at loading time - they can't move a pallet forward inflight because your soccer team wants to spread out in the back.
Legally, you shouldn't move. In practice, air crew don't seem to mind, and even sometimes encourage it, although it's not a bad idea to ask a flight attendant if it's alright first. (S)he will appreciate you asking.
I think it's bad manners to take an empty seat beside someone, if you haven't booked that seat. Find an empty row, or a seat that has an aisle/window and an empty seat beside it.