Here is one solutions (didn't test it)
Let's say your tiles are 50x50px
You click on a spot somewhere - let's take 205, 140
You could store this values in a variable and now do a little bit of math (here I call the variable vX and vY)
floor (vX / 50) * 50 and the same but with vY
floor just round the number down, so the result would tell you wich tile it is and so if multiplied by the tile size you get the position of the tile. If the origin point is not on the top left but in the center you would need to add 25 to your calculation.