For positive integers $m,n \geq 2$, let $S_{m,n} = \{(i,j): i \in \{1,2,\ldots,m\}, j\in \{1,2,\ldots,n\}\}$ be a grid of $mn$ lattice points on the coordinate plane. Determine all pairs $(m,n)$ for which there exists a simple polygon $P$ with vertices in $S_{m,n}$ such that all points in $S_{m,n}$ are on the boundary of $P$, all interior angles of $P$ are either $90^{\circ}$ or $270^{\circ}$ and all side lengths of $P$ are $1$ or $3$.
To determine all pairs \((m, n)\) for which there exists a simple polygon \(P\) with vertices in \(S_{m,n}\) such that all points in \(S_{m,n}\) are on the boundary of \(P\), all interior angles of \(P\) are either \(90^\circ\) or \(270^\circ\), and all side lengths of \(P\) are \(1\) or \(3\), we proceed as follows:

1. **Initial Observations**:
   - Since all points in \(S_{m,n}\) must be on the boundary of \(P\), \(m\) and \(n\) must be even. This is because each side of the grid must have an even number of points to ensure that the polygon can close properly with the given constraints on side lengths and angles.

2. **Special Cases**:
   - For \(m = 2\) and \(n = 2\), we can construct a simple polygon that satisfies the conditions. The polygon is simply the boundary of the \(2 \times 2\) grid.
   - For \(m = 4\) and \(n = 2\), or \(m = 2\) and \(n = 4\), we can also construct simple polygons that satisfy the conditions. These constructions can be visualized as follows:
     - For \(m = 4\) and \(n = 2\), the polygon can be constructed by following the boundary of the grid in a zigzag manner.
     - For \(m = 2\) and \(n = 4\), the polygon can be constructed similarly by following the boundary in a zigzag manner.

3. **General Construction**:
   - When both \(m\) and \(n\) are even and at least one of them is divisible by 4, we can construct a simple polygon that satisfies the conditions. The construction involves creating a zigzag pattern along the boundary of the grid, ensuring that all side lengths are either \(1\) or \(3\) and all interior angles are \(90^\circ\) or \(270^\circ\).

4. **Checkerboard Argument**:
   - Consider the grid as a checkerboard with alternating black and white squares. When traveling along the boundary of the polygon, each movement flips the color of the square. This ensures that horizontal movements end on white squares and vertical movements end on black squares.
   - If two parts of the path are adjacent without any squares in between, they must flow in opposite directions. This prevents the construction of paths that move in the same direction adjacent to each other.

5. **Key Claim**:
   - If there is a horizontal side of length 3, the horizontal movements must alternate between left and right. This is because any deviation would result in paths moving in the same direction adjacent to each other, which is not allowed.

6. **Contradiction for \(m, n \equiv 2 \pmod{4}\)**:
   - If both \(m\) and \(n\) are congruent to 2 modulo 4 and at least 6, it is impossible to construct a polygon \(P\) that satisfies the conditions. This is because any attempt to construct such a polygon would result in paths moving in the same direction adjacent to each other, leading to a contradiction.

7. **Conclusion**:
   - The pairs \((m, n)\) for which there exists a simple polygon \(P\) that satisfies the conditions are \((2, 2)\) and all even pairs for which 4 divides at least one of the two numbers.

The final answer is \( \boxed{ (2, 2) } \) and all even pairs for which 4 divides at least one of the two numbers.