There's lots of different ways to do it.
1) Record the position of where the player first starts touching eg: (StartX, StartY)
Then compare that value to where they let go
(on touch end) compare 2 values StartX > Touch.X - > player swipped left
If the touch was to the right of the start position, then the player swipped right.