This usually has to do with scaling or rendering at sub-pixels offsets, because both can cause pixels from neighboring tiles to “bleed” into the edges due to texture filtering.
To avoid it, either put a thin border (usually 1 pixel is enough) around your tiles that matches the color of the tile edge. This means you need to space out your tiles to allow for 2 pixels of space in between. Or you need to make sure to render the map at 100% scale and at whole pixel positions. Alternatively, sometimes it may suffice to disable texture filtering (setting it to nearest-neighbor instead).