Are there any general guidelines to choose the square colour for your own pawns in bishop endgames?
Especially in knight vs bishop endgames, would you put your pawns on same coloured squares as the opponent's bishop?
In general, the pawns should be on the opposite colour of the bishop, especially if this forces the opponent's pawns onto the same colour as the bishop.
This prevents the bishop from being bad (locked in by it's own pawns) and gives the bishop targets.
In my answer to When and why should I trade minor pieces?, I gave this sample position of a bishop dominating the knight:
[FEN "8/8/1k3b2/1p3p1p/pPp2P2/P1P3P1/8/1N2K3 w - - 0 1"] [Site ""] [White "Onoprienko"] [Black "Khasangatin"] 1. Kd2 Kc6 2. Ke2 Kd5 3. Ke3 Bg7 4. Kf3 Bh8 5. Ke3 Bg7 6. Kf3 Bf6 7. Ke3 h4 8. gxh4 Bxh4 9. Kf3 Bf6 10. Ke3 Ke6 11. Kf3 Kf7 12. Kg3 Kg6 13. Kh3 Kh5 14. Kg3 Be7 15. Kh3 Bh4 16. Nd2 Be1 17. Nb1 Bf2 18. Kg2 Be3 19. Kf3 Bc1 20. Kg3 Kg6 0-1
This position is cited from Understanding Chess Endgames by John Nunn
I mostly agree with the other answers, but want to make one distinction.
Yes, for long-term strategic reasons it is generally correct to fix the opponent's pawns on the same colour as their bishop in order to restrict that bishop.
However, for short-term tactical reasons the opposite is often true. You may want to fix some of the opponent's pawns on the opposite colour of the bishop so that they cannot be defended by the bishop.
[Title "White to move"] [FEN "8/pkp5/1p6/5bp1/8/1P4P1/PK1N4/8 w - - 0 1"] 1. g4!
White to move plays
1. g4! and black has no way to defend the pawn on
g5, with a draw as the likely result.
The normal pawn square color rule says: put your pawns on the opposite color. But there's an exception.
So, the precise answer depends on two things:
Are you playing, or are you trying to transition to, an opposite-colored bishops endgame?
If so, and you are the attacker, you follow the normal pawn square color rule: put your pawns on the opposite color.
If so, and you are the defender, put your pawns on the same color as your bishop, so they cannot be attacked by your opponent's bishop, and you can defend them with yours.
If not, then follow the normal pawn square color rule (see #2).
See my response to the question When should I trade into opposite-colored bishops? for more details.
It depends on the stage of the game an the pieces on board. The principles I usually follow is 1. If there is a knight on the board, then it would be better to place some pawns on thesame color most of them on a different colour so that the bishop could quickly be attached to a pawn when it's threatened to prevent forks.